Hello!
I've noticed that 'for' loops don't seem to work in event script blocks. It doesn't throw an error, it just freezes the game (forcing me to forcibly kill the window). This leads me to think it's stuck in some kind of infinite loop.
I've tried to use the following (which involves Yanfly's Self Vars/Switches plugin, but I don't think the problem is with the plugin):
for (var myCounter = 1; myCounter < 5; myCounter++) {
this.setSelfSwitchValue(1, myCounter, 1, true);
}
I tried using 'let' in the iterator declaration, thinking it was some kind of weird scope issue, but the game said 'let' wasn't supported in my version (1.5.2; is 'let' supported in 1.6?).
Can one just not use loops in event script blocks, or is there some other kind of mojo I need to invoke to get it to work?
Thank you!
I've noticed that 'for' loops don't seem to work in event script blocks. It doesn't throw an error, it just freezes the game (forcing me to forcibly kill the window). This leads me to think it's stuck in some kind of infinite loop.
I've tried to use the following (which involves Yanfly's Self Vars/Switches plugin, but I don't think the problem is with the plugin):
for (var myCounter = 1; myCounter < 5; myCounter++) {
this.setSelfSwitchValue(1, myCounter, 1, true);
}
I tried using 'let' in the iterator declaration, thinking it was some kind of weird scope issue, but the game said 'let' wasn't supported in my version (1.5.2; is 'let' supported in 1.6?).
Can one just not use loops in event script blocks, or is there some other kind of mojo I need to invoke to get it to work?
Thank you!