I can not figure out how to fix this error. I thought maybe it was the way he named his sprites but that doesn’t seem to be it.
It doesn’t like the 09 on line 2.
// Create your variables here
var player = createSprite(200, 9);
player.setAnimation("mario2");
player.scale = 2.0;
var mario = createSprite(200, 200);
mario.setAnimation("mario1");
mario.scale = 2;
var fireball = createSprite(200, 200);
fireball.setAnimation("enemies1");
fireball.scale = 4;
var player;
// Create your sprites here
function draw() {
background("white");// draw background
// update sprites
if (keyDown("up")) {
player.velocityY = -4;
} else if (keyDown("down")) {
player.velocityY = 4;
} else {
player.velocityY = 0;
}
if (keyDown("right")) {
player.velocityX = 4;
} else if (keyDown("left")) {
player.velocityX = -4;
} else {
player.velocityX = 0;
}
if (player.isTouching(fireball)) {
fill("black");
}
drawSprites();
}
// Create your functions here
Varrience
Thank for your help, as always!
Ms. Langill