This is my code:
while True: currentHealth = hero.health healingThreshold = hero.maxHealth / 2 # If your current health is less than the threshold, # move to the healing point and say, "heal me". # Otherwise, attack. You'll need to fight hard! if currentHealth < healingThreshold: hero.moveXY(65, 46) hero.say("heal me") else: enemy = hero.findNearestEnemy() hero.attack(enemy)
The yellow duck is telling me that there is an error on the last line but it doesn’t tell me what it is and I can’t figure it out. Please help me!