- Joined
- Apr 22, 2015
- Messages
- 129
- Reaction score
- 4
- First Language
- English
- Primarily Uses
I have an event that sets values to Variables 24-31. Variable 11, in this scenario, is a random number.
Rather than list them individually, I made a loop that references another variable within the variable.
However, I just can't seem to get it to work. I realize, listing them is technically less lines of code, but I prefer using the loop.
So what is it that I'm doing wrong?
This:
$gameVariables.value($gameVariables.value(32)) == $gameVariables.value($gameVariables.value(52))
Should become this:
$gameVariables.value(24) == $gameVariables.value(11)

Sidenote:
I had to add an additional "=" inbetween the strings to avoid a Left-Hand error, which I thought was odd since it's not an IF condition, but I guess that's javaScript for you.
EDIT:
I think I just realized the problem. I need to write it as:
$gameVariables.setValue($gameVariables.value(32),$gameVariables.value($gameVariables.value(52)))
Rather than list them individually, I made a loop that references another variable within the variable.
However, I just can't seem to get it to work. I realize, listing them is technically less lines of code, but I prefer using the loop.
So what is it that I'm doing wrong?
This:
$gameVariables.value($gameVariables.value(32)) == $gameVariables.value($gameVariables.value(52))
Should become this:
$gameVariables.value(24) == $gameVariables.value(11)

Sidenote:
I had to add an additional "=" inbetween the strings to avoid a Left-Hand error, which I thought was odd since it's not an IF condition, but I guess that's javaScript for you.
EDIT:
I think I just realized the problem. I need to write it as:
$gameVariables.setValue($gameVariables.value(32),$gameVariables.value($gameVariables.value(52)))
Last edited:


