Brigg

Veteran
Veteran
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)


RMMV.Var.within.Var.JPG

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:

Sarlecc

Veteran
Veteran
Joined
Sep 16, 2012
Messages
453
Reaction score
211
First Language
English
Primarily Uses
RMMV
Actually by using the double ='s it was evaluated as being either true or false. So:
Code:
1 == 1 // this equals true
1 == 0 // this equals false
Currently I am too tired to be of much further help at the moment sorry. :LZYdizzy:
 

Latest Threads

Latest Posts

Latest Profile Posts

Databasing. Just with what I consider "bare minimum", I have listed over 200 skills. That's not all of it, and isn't even considering skills that only 1 class would realistically have. lol

It's a Spanish devlog don't get scared!.
Just read the forum rules just for kicks and rule 14 reminds me of this:
150.jpg
I'm in the process of converting all locks and intimidate/persuade dialogue options into D20 DC based success/fail (modified by player skill). Before, it required a certain flat amount you had to meet, but with rolls, it offers more freedom. For instance, you can repeatedly try to unlock a door instead of just not meeting the requirement to unlock it.
Since we get very close: If you want to enjoy the advent calendar as it is intended, wait til your date and the day in the URL line up, so you have the final day on actual christmas and not the day before... time zones ;3

Forum statistics

Threads
117,051
Messages
1,104,162
Members
153,019
Latest member
NicoLeonis
Top