Backwoods standoff python

so i have the code as follows
while True:
enemy = hero.findNearestEnemy()
if enemy:
yet for some reason my hero will cleave and run up to individual enemies and not attack… why?

also i might add everything is indented properly but my copy and paste screwed it up

If there is wood:
   Cut the wood
   Grab the wood

Why this code don’t work?

You can always edit your post and correct the formatting so we can see it. Please make sure that your code is properly formatted when asking for assistance. Formatting is very important to trouble shooting.

The reason your code isn’t working is because you aren’t using the cleave method properly. Click on the cleave method in the middle of the screen and it will reveal the proper format needed to use this method.