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

Can't wait for next update! :)
I really want to get a cat... but our puppy is still... well... a puppy and would eat and bark at a cat if we got one... *sighs* I guess I'll wait a couple of years~
unintentionally made a track that sounds straight out of Yume Nikki
Revisiting one of my older projects in a long time to work some more on the mechanics. I've been working on- and off-again for about a year now on recreating the Force and Mystic systems from Wild ARMs. And I think I've finally made some good breakthroughs on that!

Still, it is not perfect and I may post my thoughts at a later time to see if there are any other suggestions or alternatives I've missed.
actor name string, why you gotta be case sensitive like that?

Forum statistics

Threads
116,111
Messages
1,095,882
Members
151,516
Latest member
HevaCat
Top