AKA infinite message boxes of doom
I have a script that is supposed to run once, disable a unique static (luce_in_c_plain_room_side), give me a notification and then stop running. It disables the static just fine, but then continues to run and give me infinite message boxes.
My reading of this script is that the marker variable is set, the if tests as true, it ups the variable so that it won't run again, the static is disabled, I get a messagebox, and then the script should either end or at least not do anything ever again. Clearly that's not what's happening.
Any ideas on where I'm going wrong?
begin luce_stavpatchdisable
short doOnce
set doOnce to 1
if ( doOnce == 1 )
set doOnce to 2
luce_in_c_plain_room_side -> Disable
MessageBox "Disabled"
endif
end luce_stavpatchdisable