Kithgard Enchanter trouble [SOLVED]

def moveRight():
    target = { "x": hero.pos.x + 12, "y": hero.pos.y }
    while hero.distanceTo(target) > 0:
        hero.move(target);

# Bepaal moveLeft
def moveLeft():
    target = { "x": hero.pos.x - 12, "y": hero.pos.y }
    while hero.distanceTo(target) > 0:
        hero.move(target);
# Bepaal moveUp
def moveUp():
    target = { "x": hero.pos.x, "y": hero.pos.y + 12 } 
    while hero.distanceTo(target) > 0:
        hero.move(target);
# Bepaal moveDown
def moveDown():
    target = { "x": hero.pos.x, "y": hero.pos.y - 12 }
    while hero.distanceTo(target) > 0:
        hero.move(target);

# Gebruik nu deze functies!
moveRight()`Preformatted text`
moveDown()
moveUp()
moveUp()

there is my code. It keeps saying that while hero.distanceTo(target) > 0:
hero.move(target); is wrong?
Any help? :smiley:

Nothing wrong with your functions. See carefully how you move:

moveRight() #`Preformatted text` # comment this line
moveDown()
moveUp()
moveUp()
# and then....

I think you have boots not supporting the action move. And you miss the last command.

1 Like

what do you mean? Please english because i dont know what “see carefully how do you move”
It says my code is wrong.

I don’t get why you are asking for english? He’s replying in english already. He’s saying you have to change the movement of the player. Also, you are not using the correct boots. Buy a boot that has move() not moveXY()

How do I change my boot so that I have move()?

Go to game options select hero, then change your boots

Oh ok, never mind. Students have set equipment. Instead of move, change it to hero.moveXY(hero.pos.x+?,hero.pos.y+?) Just replace the ? with the correct digit.

Thank you so much! My lord I have been stuck on that level