Ok, so I just spent an hour trying to figure out why a simple script in MZ wasn't working like I thought it was supposed to. I thought it was pretty straight forward:
$gameSelfSwitches.setValue([1, 1, 'A'], true);
Map ID is 1, Event ID is 1, and Self Switch being turned on is A.
But it wouldn't work.
I thought I was being clever by taking notes about scripts in a Word document that I could copy and paste later.
After an hour, I finally noticed that the quotes around the 'A' looked different in the script from other examples I had used in the past while recreating tutorials and typing the script in manually while following the tutorial. When I retyped the single quotes around the A, they looked correct and the event worked perfectly.
In the Word document, the single quotes are one down and one up by default. When I copied and pasted the script, it made the single quotes look almost like they were italicized. Maybe it was the font I was using in Word.
Has anyone else run across copy and paste problems with scripts? Where you copy and paste the correct script but it doesn't work. Yet if you type it in directly, it works correctly? Maybe due to font in Word or something?
Just wondering since it was driving me crazy and I was actually getting ready to post a question here to figure out why the script wasn't working.
Thanks!
$gameSelfSwitches.setValue([1, 1, 'A'], true);
Map ID is 1, Event ID is 1, and Self Switch being turned on is A.
But it wouldn't work.
I thought I was being clever by taking notes about scripts in a Word document that I could copy and paste later.
After an hour, I finally noticed that the quotes around the 'A' looked different in the script from other examples I had used in the past while recreating tutorials and typing the script in manually while following the tutorial. When I retyped the single quotes around the A, they looked correct and the event worked perfectly.
In the Word document, the single quotes are one down and one up by default. When I copied and pasted the script, it made the single quotes look almost like they were italicized. Maybe it was the font I was using in Word.
Has anyone else run across copy and paste problems with scripts? Where you copy and paste the correct script but it doesn't work. Yet if you type it in directly, it works correctly? Maybe due to font in Word or something?
Just wondering since it was driving me crazy and I was actually getting ready to post a question here to figure out why the script wasn't working.
Thanks!