I have a strange problem. I cannot manage to update values in certain arrays, but only in an if statement.
For example:
if state=1 then
array1[1]:=array1[1]+newvalue
else
array2[1]:=array2[1]+newvalue;
Array1 does not work; it will always be 0. When I copy-paste the code outside the 'if' it works, so I know it is correct. When I try to change the if statement so it is opposite, (switch the if and else criteria) the same array (array1) doesn't work.
Any Suggestions?
For example:
if state=1 then
array1[1]:=array1[1]+newvalue
else
array2[1]:=array2[1]+newvalue;
Array1 does not work; it will always be 0. When I copy-paste the code outside the 'if' it works, so I know it is correct. When I try to change the if statement so it is opposite, (switch the if and else criteria) the same array (array1) doesn't work.
Any Suggestions?