Hi, either I didn't get something, or I have found another bug.
I put the following code in the Pre-Game part:
set arr (x y);
sub test:
local a2;
set a2 ();
for i var arr: push a2 #i; next;
for i var a2: echo #i; next;
endsub;
gosub test;
gosub test;
I believe the output of this should be:
x
y
x
y
since test is called twice, and both times the content of arr is copied into a2 and then output. But the output is in fact:
x
y
x
y
x
y
In the second call of test, the old content of a2 is seemingly not deleted, and the 'x y' is appended to it.
If I make the variable a2 global (i.e. delete the line 'local a2;') then it works as it should.