I’ve been working on this level for a while, here’s my code:
var enemy = hero.findNearestEnemy();
// Use an if-statement with isReady to check "cleave":
if (hero.isReady("cleave")); {
// Cleave!
hero.cleave();
}
// Else, if cleave is not ready:
else {
// Attack the nearest ogre!
hero.attack(enemy);
}
}
I’m using javascript, but when I try typing in else, it keeps telling me "Expected an identifier and instead saw “else”. I can’t really figure it out. If someone could help me that would be great, thanks!