- Joined
- Jan 17, 2016
- Messages
- 261
- Reaction score
- 145
- First Language
- English
- Primarily Uses
Why does this very basic script fail:
with this error:
All I need to know is how to initialise the variable to stop it from failing.
That's all.
I'm not new to scripting I am just new to Ruby and I just need to get my head around some of the basics. So, just a nudge - why does this fail on load?
I have the $game_switches[1] switch set to "true" as a Player Touch event on the map.
To clarify: I get that the variable has to exist before I can apply a value to it. I've been through the scripts I am using but what I cannot see is a methodology for initialising the variable\switch\widget that I need to use PRIOR to when I need it, so the game does not fail.
I can do this this in Powershell and T-SQL, but I cannot work out how to declare and set the initial value for a variable in Ruby, specifically in VX Ace.
That's all the info I need to know - how to do that...?!
Thank you!
Anyone?
with this error:
All I need to know is how to initialise the variable to stop it from failing.
That's all.
I'm not new to scripting I am just new to Ruby and I just need to get my head around some of the basics. So, just a nudge - why does this fail on load?
I have the $game_switches[1] switch set to "true" as a Player Touch event on the map.
To clarify: I get that the variable has to exist before I can apply a value to it. I've been through the scripts I am using but what I cannot see is a methodology for initialising the variable\switch\widget that I need to use PRIOR to when I need it, so the game does not fail.
I can do this this in Powershell and T-SQL, but I cannot work out how to declare and set the initial value for a variable in Ruby, specifically in VX Ace.
That's all the info I need to know - how to do that...?!
Thank you!
Anyone?
Last edited by a moderator:

