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,135
Reaction score
1,102
First Language
Spanish
Primarily Uses
RMVXA
$gameVariables.

$gameVariables.value(index)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,652
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 Posts

Latest Profile Posts


:3c here's a thing i made a while while while back
Tried mochi for the first time. It's quite nice. Has a pleasant smell and taste, and is nice and chewy.
made a bio for the protag in my project!
Beggar : "I haven't eat for days..."
Kid : "Just do crime! You will get daily necessity for free in prison~"

Forum statistics

Threads
99,159
Messages
962,454
Members
130,725
Latest member
teendinsaikha
Top