Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Long-Range Division Help


I can’t pass this level because my hero can’t survive.
He only attacks one enemy and then stopped.

Would you please tell me why?


There’s a few problems here. In lines 9 and 12 you use strings as arguments. These arguments are already defined as a variable in line 6 and should be used as such. They should not be strings. Also, you globally define enemy in line 5 and improperly define enemy in line 22. You need to delete line 22 and move line 5 there.

Edit: Leave line 5 where it is but copy it to line 22.

1 Like

or, delete line 22, and add enemy = hero.findNearestEnemy() or add enemy = behind hero.findNearestEnemy()


success! Thank you so much!