views:

24

answers:

1

I am getting 2 syntax errors out of this. I am new to Flash. How can I fix this?

var paddlepos:int = paddle.x.position

if; (paddlepos > 253) 
{
    paddle.x.postition = 253;
}

Syntax errors:

Scene 1, Layer 'Actions', Frame 1, Line 28 1084: Syntax error: expecting rightparen before leftbrace.
Scene 1, Layer 'Actions', Frame 1, Line 27 1084: Syntax error: expecting leftparen before semicolon.

Thanks.

A: 

The error on Line 27 tells you the exact reason. "Expecting leftparen before semicolon."

Move that semicolon from your "if;" to the end of your first line of code.

Andy