Hi,
I am using Javascript. I succeed charging the level and nothing seems wrong, but when I run my code, nothing happens except the time bar continues. There isn’t even a error message. Here is my code:
// findEnemies returns a list of all your enemies.
// Only attack shamans. Don't attack yaks!
var enemies = this.findEnemies();
var enemyIndex = 0;
// Wrap this section in a while loop to iterate over all enemies.
while (enemyIndex<3) {
var enemy = enemies[enemyIndex];
if (enemy.type == 'shaman') {
while (enemy.health > 0) {
this.attack(enemy);
}
}
enemyIndex=enemyIndex+1;
}
Could you please find the error ?