Please Help With Error 1086
Hello. I was writing a program. Below is the program I've written. There was an error that said
Scene 1, Layer 'Car', Frame 1, Line 7 1086: Syntax error: expecting semicolon before leftbrace.
I've put a semicolon there and I got about 37 errors about properties and such.
So can someone tell me what is wrong with this program please?
onClipEvent(load)
{
speed =0 ;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
speed +=1;
}
if (Key.isDown(Key.DOWN)) {
speed -=1;
}
if (Math.abs(speed)>20) {
speed *= .7;
}
if (Key.isDown(Key.LEFT)) {
_rotation -= 15;
}
if (Key.isDown(Key.RIGHT)) {
_rotation += 15;
}
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.land.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}
