Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
It is important that we understand how your code is indented in Python to capture any mistakes related to that. Please read through the linked topic to learn how to do that.
I believe the issue is following the one line checking the distance. You are missing this part of code to make sure the distance is greater than 0.
# If the enemyDistance is greater than 0:
Also, make sure you say the variable, and not 10 like you currently have coded.