ExoY is right. Especially about the missing local, leaking global variables.
Hint about scripts testing ingame:
MerTorchbug provides a script history and ways to run multiline scripts ingame.
Just type /tbs to open it. All /script entries will be added to that history.
It's easier to test things ingame that way.
|