I need help on Library Tactician

Switch this for a for i in range for loop.


You don’t need this.(After the for i in range(archers):)


You need the for i in range type of for loop. Or else, it return a different enemy for every archer.(I think)


Right after the for loop, you need something that gets one of the enemies from the enemies.

Hint

You already have some in your code. Look at the for loop for the soldiers and what comes after it.


You can del the

at the top of the while loop.
Your defining wizard twice. But I don’t think your gonna be using that(might as well del that).


Like i said before,

Your code:

at that line, commandArcher(archer) is just fine.(Since you have archer = archers[i] it already returns one out of all of the archers(And then signals the others to do the same. Pretty much like a repeat for the others))


And last but not least. At this line:

Your code:

You have a typo.

archers = hero.findByType('archers')

look at the find soldiers one

Do you spot any difference?


Stuff i have to ask you @Lukyme:

P.S : whats the console.log() thing at the top?

P.S.S : If you have any more problems with your code. Pls tell us