At 10/3/07 11:50 AM, Ringwraith1 wrote:
Sometimes there are lots of errors like "statement must appear within a handler" or "statement must be terminated by "}" " or "syntax error" Someone plz help!
The actionscript debugger is very good with finding out exactally what is wrong with your code in a clear way. When it says statement must be on handler it means you have code on an MC or button with out including the code in a mc or button event.
//Like this for MCs
onClipEvent(enterFrame) //execute everyframe
{ //All working code goes here
}
Just find a tutorial for MC and button events. Really basic stuff, essential for every scripter.
When it says statement must be terminated by "}" it means that you have a "{" with out a matching "}" Remember this applies no matter what so if your program has 1000 "{"s it MUST have 1000"}". THe fuction of the "}" is to end a block of code.
syntax error means you typed something that the compiler doesn't recognize entirely.
This error isn't that common because the debugger is usually more specific. So you just need to look at the lines with the error on them.