Printing a variable in the console. $game_variables not recognised.

Joined
Sep 28, 2019
Messages
18
Reaction score
7
First Language
English
Primarily Uses
RMMV
I'm trying to read some variables in the console, using the following script command:

console.log("Logging variable 2. Value is " + $game_variables[2]);

On triggering the script, I get 'ReferenceError: $game_variables is not defined".

Having done a little searching, I haven't found another way to access game variables. It seems to be either '\v' in a text window or $game_variables in scripts.
If anybody has any idea how to read the switch states, variables etc. in the console, I'd appreciate your sage advice!
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,137
Reaction score
1,104
First Language
Spanish
Primarily Uses
RMVXA
$gameVariables.

$gameVariables.value(index)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,653
Reaction score
1,105
First Language
EN
Primarily Uses
RMMV
Yea, $game_variables is what it was in VX Ace (maybe XP as well).

Also, in case it comes in handy: there's a debug screen available by pressing F9 during playtest. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

just spent FOREVER troubleshooting an issue with my keyboard... turns out the cord was just loose OTL
I count on someone one time, I let them promise something to me, and one week later it's complete silence as I'm completely let down. I hate everything.
Everytime I need to write dialogues I find myself writing new music pieces... what kind of trick is this?!
Me Being Dumb spending hrs trying to figure out Irenas Visual Novel busts plugin..lol. I'm probably missing something stupid and obvious xDD

let the journey begin >w>
X.X ok... I guess I'll just have to think about 48x48 a little differently. Its not "room for more work"..."its room for more detail!...yay"

Forum statistics

Threads
99,218
Messages
963,167
Members
130,807
Latest member
NotADev
Top