[Solved]Need Help With Lurkers

Yeah i’ve been stuck on this level for about half an hour and (my brains starting to hurt) - off topic

But my hero doesn’t want to move for some reason heres my code

enemyIndex = 0
enemies = hero.findEnemies()
while enemyIndex < 6:
    enemy = enemy[enemyIndex]
    if enemy.type == "shaman":
        pos = enemy.pos
        x = pos.x
        y = pos.y
        hero.say ("Hello!")
        enemyIndex += 1
        while enemy.health > 0:
        enemyIndex += 1

It says that it cannot read property ‘0’ of undefined

Any suggestions?

It should be enemy = enemies[enemyIndex] not enemy = enemy[enemyIndex]

I see thank you so much @JustALuke

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.