Page 1 of 1

wierd compiling error.

PostPosted: Thu Jul 23, 2009 8:16 pm
by andymac
This line will compile in the code editor, but not when I try to use it as a script lock:
Code: Select all
for ( i = 254; Abs(y) < 127 && Abs(x) < 127; i++;){
}


Why? and is there a code equivalent to this that I could use?

PostPosted: Thu Jul 23, 2009 9:28 pm
by L. Spiro
The code you posted will not compile anywhere.

The following code compiles in both the Script Editor and in Script Locks:

Code: Select all
VOID Lock() {
   int i;
   int y;
   int x;
   for ( i = 254; Abs(y) < 127 && Abs(x) < 127; i++){
   }
}



L. Spiro

PostPosted: Fri Jul 24, 2009 3:21 pm
by andymac
Sorry, that was just an excerpt from the code, not the whole thing. It turns out, the problem was in fact to do with the content inside the for loop, however commenting out the for loop meant it worked, so I assumed the problem was that line, but thanks anyway.