Elikkä tarttisin apua tähä scriptii ku sanoo että error ^^
onClipEvent(load) {
var speed:Number = 0;
var walk:Number = 3;
var run:Number = 6;
var grav:Number = 0;
var falling:Number = 0;
var jumped:Boolean = false;
var jumpHeight:Number = 15;
var touchingGround:Boolean = false;
var scale:Number = _xscale;
}
onClipEvent(enterFrame) {if (!touchingGround){ <--- line 12
grav++;
this._y += grav;
} else {
grav = 0;
}
if (_root.ground.hitTest(_x,_y,true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(Key.LEFT)) {
_x -= speed;
this.gotoAndStop(2);
_xscale = -scale;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
this.gotoAndStop(2);
_xscale = +scale;
} <--- line 32
Ja error oli:
**Error** Scene=Scene 1, layer=Stand, frame=1:Line 12: Statement block must be terminated by '}'
onClipEvent(enterFrame) {if (!touchingGround){
**Error** Scene=Scene 1, layer=Stand, frame=1:Line 32: Syntax error.
}
Total ActionScript Errors: 2 Reported Errors: 2