Preferential Treatment Coding Error

Hi,

I am getting a coding error “Cannot use ‘in’ operator to search for 0 in findNearest” and I’m not sure what this means. Can someone care to enlighten me a little?

Also I was wondering how my code looks for this level. I am supposed to attack the throwers first and then afterwards attack the regular munchkins. I’m too lazy to copy and paste it so here is a screenshot.

Th

Thank you,

trooper5010

one of your loops says “for enemy in enemy”, the other says “for enemy in enemies”. Are they both right?

Also, you check is Chain Lightning is ready with canCast, not isReady.

I’m pretty sure you will never leave the first loop, because the break breaks out of the for, not the loop.