I keep using the code I am attaching and it keeps failing. I have no idea why this code won’t work.
# If “cleave” is ready, cleave; otherwise, attack.
enemy = hero.findNearestEnemy()
distance = hero.distanceTo(enemy)
if distance < 5:
# Call the “cleaveOrAttack” function, defined above.