Help with level/arcane-ally


#1

Hi,
I am stuck in - level/arcane-ally. here is my code. but this is failing and the code in the help section is the same.
i am able to kill the 1st ogre, but get killed by the second ogre. My health level is 61 on the board. why is my code failing.

// Take down those ogres!
loop {
var enemy = this.findNearestEnemy();
if (enemy) {
this.attack(enemy);
}

}

Thanks


#2

thanks guys. i switched swords and the code worked.

thanks