I didn't see a reasonable way to handle it at the time, and I'm not entirely certain I do even now. The script data becomes invalid, so it should quit running immediately. It can't be handled like Quit, because that would clear the script you just set. It can't be handled like Waitframe, because then it would try to resume from the same point next frame. It would have to be a new special case.What is the reason for this?
Calling Quit() sets the script to 0, so that might at least appear to work.I was not aware that this does not work, and I've been doing this->Script = 0 for years.
This does it:FFSCRIPT in ZASM does not seem to preclude setting the script on a this pointer.
void do_set(const bool v, byte whichFFC) { // Trying to change the current script? if(sarg1==FFSCRIPT && ri->ffcref==whichFFC) return; long temp = SH::get_arg(sarg2, v); set_register(sarg1, temp); }