How would I check a Variable [As Defined by MV] in a Script?

Like, let's say, I'm looking for Variable [45] and it needs to be 1.

"if $gameVariables.value(45)===1" would that be what I'm looking for?


 
Yep. The correct syntax is:

if ($gameVariables.value(45) === 1) { // do stuff here}And of course that needs to be within a function that will only run AFTER $gameVariables has actually been created.

Original thread: https://forums.rpgmakerweb.com/threads/how-would-i-check-a-variable-as-defined-by-mv-in-a-script.51447/