ID:139603
 
Code:
mob/verb/MakeVote()
var/VQuestion=input("What do you want the question to be?") as null|text
Questions += VQuestion
var/amount = input("How many responses do you want there to be?") as null|num
for(var/i = 1; i<amount; i++)
var/list/Option
Option += input("What do you want option number [i] to be?") as null|text
Questions[VQuestion] = Option //This is the error line


Problem description: When I compile, it gives me no errors, but when I run it, it stops the proc after asking what they want option number [i] to be, for the first time. The error is bad index and it tells me the culprit is the appointed line. I've tried making it..
Questions["[VQuestion]"] = ...

But that just seems rather redundant and it didn't help. So I don't know what to do. Perhaps I'm making a newb mistake. I make a bunch of those without noticing it sometimes.. Sorry.

You didn't initialize Questions as a list. You may have written var/list/Questions, but unless you explicitly initialize it as a list (with Questions = list()), it'll default to null, and null+text = text, not a list.
In response to Garthor
Oh, hehe.. I'm so smart. What's funny is I did it correctly elsewhere. Thanks!
In response to SHSPlyr03
Scratch that.. I still have the same error
In response to SHSPlyr03
Then Questions is still null.

Completely random guess because you're giving me nothing to go on: you are loading the value from a savefile, but the value in that savefile happens to be null (or a text string), so changing how you initialize Questions will do nothing, as it'll just be overridden with an invalid value.
It looks to me like you are trying to set the length of your list to a text string? Unless I'm reading wrong, Questions[] should have a number in place of the brackets, not your question. Considering your question is the last postion in your list, I suppose you could do Questions[Questions.len] = Option?

I am honestly puzzled at how you are sorting this, it seems your question and responses fall under a mass list of questions and responses... either way, this might be of help to you.
In response to CauTi0N
I was trying to make it set the value of the list to a list, which is pretty convoluted and I don't even know if it works.. So..
In response to SHSPlyr03
SHSPlyr03 wrote:
I was trying to make it set the value of the list to a list, which is pretty convoluted and I don't even know if it works.. So..

There's nothing wrong with putting a list in a list. The issue is, again, that you do not have a list in the first place.