Does anyone know where the error is?

I am at forest fire dancing and when the stone disappears he does not move
this is the code i use

while true:
    evilstone = hero.findNearestItem ()
if evilstone:
    pos = evilstone.pos
if pos.x == 34: # = means "is equal to"
# If the evil is on the left, go to the right side.
   hero.moveXY (46, 22)
# If the evil is on the right, go to the left side.
hero.moveXY (34, 23)
# If there's no evilstone, go to the middle.
hero.moveXY (40, 23)

Maybe someone of you knows where the error is

Hi and welcome to the Codecombat discourse lol935!
First of all, it’s important in python to have the identation correct (the spacing infront of the code)
But i’d guess that it’s just a mistake in formating the code here

Other than that, for the while true: line:
It’s “True” and not “true

and these passport lines: (unsure what the intention for this is here?)

These error messages usually tell you quite alot! Don’t forget about them :smile:

1 Like

It’s because passport isn’t defined try this code

Mod edit: Please do not post final solutions.