No sure what's the issue here, but weirdly enough, one of these Scripts doesn't work... Any thoughts?
MV Script won't work | Variables.setValue
Javascript/Plugin SupportYou're setting the value of change to a game variable with the ID eventID/$gameVariables.value(1). If it's a unsupported number, it won't work. What is the value of Game Variable 1 before you call this script? Check in the debug menu or do console.log($gameVariables.value(1))
Why are you putting the value 1 into a variable to assign it? Why don't you just put 1 in the setValue command?
Why are you putting a game variable into a script variable, then using the script variable to pass into something else?
would do the same thing in a much less complex way.
Why are you putting a game variable into a script variable, then using the script variable to pass into something else?
Code:
$gameVariables.setValue($gameVariables.value(1), 1)
would do the same thing in a much less complex way.
It's possible that the event will be setting a different variable depending on the value in variable 1, but I can't imagine what the purpose of such an event could be.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/script-wont-work-variables-setvalue.137277/