So I can't seem to get any kind of useful answer ANYWHERE about this, so I'm hoping someone here will have an answer.
To start off, I'm trying to set up array variables, which I will then populate. But when I try to set/read the value, I keep getting told cannot set/read property of undefined when I actually try to run the script.
I know that a variable is undefined if you try to use it without setting a value of any kind. The problem is that the script seems to be throwing a fit about undefined variables.... WHILE I'M TRYING TO DEFINE THEM!
For example, I'll declare a variable array in the global space of a plugin, setting it to [] when I do. But then when attempting to set a value in the array with a function, either with a push statement or simply writing example[0] = x, I get told it can't set property of undefined.
I've tried just about every variation I can think of to get it to work, but no dice. Anyone have a clue what I'm doing wrong?
To start off, I'm trying to set up array variables, which I will then populate. But when I try to set/read the value, I keep getting told cannot set/read property of undefined when I actually try to run the script.
I know that a variable is undefined if you try to use it without setting a value of any kind. The problem is that the script seems to be throwing a fit about undefined variables.... WHILE I'M TRYING TO DEFINE THEM!
For example, I'll declare a variable array in the global space of a plugin, setting it to [] when I do. But then when attempting to set a value in the array with a function, either with a push statement or simply writing example[0] = x, I get told it can't set property of undefined.
I've tried just about every variation I can think of to get it to work, but no dice. Anyone have a clue what I'm doing wrong?