For exemple in the ARMTSHIP.bos from OTA, there is:
Code: Select all
BoomCalc(posxz,posy)
{
var dxz,dy,lenxz;
....
}Because TA can't handle it when too many variables are declared, I like to declare my local variables only when they are needed, instead of always declaring everything at the beginning of the function.
But that makes scripts that work fine in TA3.1c to fail in Spring70b2!
Here's the unit that led me to believe that:
ArmDuck_Spring_Local_Var_Declaration_Buggy.ufo
Its script goes basically like:
Code: Select all
TransportDrop(id,xz)
{
if(manual_unload)
{
some simple code;
return;
}
//Auto unload
var shape;
shape=0;
if(shape==0)
{
move the white ball;
}
unload the unit on the white ball;
}However, when I move the variable declaration to the top of the function, then it works fine in Spring. The script is a bit long, so search for the text BugBugBug1 and BugBugBug2 to go to the relevant places.
