Help with "Lukers" code


#1

This is my code, I don’t know what’s wrong.


#2

The comment says to iterate over all enemies. However, you iterate over just three. That is not right. Additionally, you need to update enemyIndex no matter what type the enemy is.


#4

if I put this code, he say to me that is wrong


#5

Now my code is that, I don’t know how to update “enemyIndex”, and I think is for that reason because now he only attack yaks


#6

It appears that on Line: 6 you have an exclamation point. Is this intentional?


#7

Yes because if a put that the enemy.type is equal to shaman, he say to me that i’m creating an infinitite loop


#8

On Line: 6 maybe you should try putting ‘:’ at the end.


#9

i get it, but i don’t know how, i was changing something, and it works. Thank you


#10

You’re welcome :grinning:


#11

Looks like your incrementing enemyIndex now in the right place…