And that is not why the code does not work. The code will work with the two of them if @Armin_Alimohammadi checks and fixed what I mentioned above. But it is a good observation and @Armin_Alimohammadi should also look to fix that. (Only the second one should be removed)
Hello, i hope your having a good day but i need some help! heres my code!
`while True:
# Call nearestEnemyDistance() and
# save the result in the variable enemyDistance.
enemyDistance = nearestEnemyDistance()
# If the enemyDistance is greater than 0:
if hero.distanceTo > 0:
enemyDistance = nearestEnemyDistance()
# Say the value of enemyDistance variable.
hero.say("enemyDistance")
`
No you are confusing javascript with python. In python (which is the one you are coding right now) you dont need to do var = you just do x = 80 or whatever