# Kithgard Enchanter

**URL:** <https://discourse.codecombat.com/t/kithgard-enchanter/26597>\
**Category:** Level Help\
**Created:** [January 13, 2021, 7:09pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597 "2021-01-13T19:09:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bladee](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@bladee](https://discourse.codecombat.com/u/bladee)\
**Post date:** [January 13, 2021, 7:09pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/1 "2021-01-13T19:09:12Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/d/2/d25dbd5d545710ae9dd31ef0292cfb5f509a89e9.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/f/4/f43268a5626c399ccc4ecb889ccb80ede4397324.jpeg)  
For some reason my line 7 isn’t working, was wondering if anyone knows why it’s not working ☹

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 7:11pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/2 "2021-01-13T19:11:03Z")

</div>

Can you post your code

> [@\[Essentials\] How To Post/Format Your Code Correctly](https://discourse.codecombat.com/t/essentials-how-to-post-format-your-code-correctly/15521/6):
>
> Making it a wiki so people can help update the missing images. slight_smile (Thank you @ZAX155)

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://discourse.codecombat.com/u/abc)\
**Post date:** [January 13, 2021, 7:12pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/3 "2021-01-13T19:12:36Z")

</div>

You hero doesn’t have the method move, so instead of every `hero.move` write `hero.moveXY(target.pos.x, target.pos.y)`. Also, python doesn’t need semicolons, remove all the semicolons.

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 7:13pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/4 "2021-01-13T19:13:12Z")

</div>

also please post your code properly in the future

---

<div class="post-metadata">

**Author:** ![Archipelago-Gold](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/archipelago-gold/32/18442_2.png) [@Archipelago-Gold](https://discourse.codecombat.com/u/Archipelago-Gold)\
**Post date:** [January 13, 2021, 7:13pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/5 "2021-01-13T19:13:17Z")

</div>

When you said hero.move(Target) did you mean hero.move(toTarget)?

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 7:14pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/6 "2021-01-13T19:14:13Z")

</div>

he does not have the move method

---

<div class="post-metadata">

**Author:** ![bladee](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@bladee](https://discourse.codecombat.com/u/bladee)\
**Post date:** [January 13, 2021, 7:18pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/7 "2021-01-13T19:18:55Z")

</div>

```python
# Define your own simple movement functions.
# Define moveRight
# Note: each function should move the hero 12 meters!
def moveRight():
    target = {"x": hero.pos.x + 12, "y": hero.pos.y}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)

# Define moveLeft
def moveLeft():
    target = {"x": hero.pos.x - 12, "y": hero.pos.y}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)

# Define moveUp
def moveUp():
    target = {"x": hero.pos.x, "y": hero.pos.y + 12}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)

# Define moveDown
def moveDown():
    target = {"x": hero.pos.x, "y": hero.pos.y - 12}
    while hero.distanceTo(target) > 0:
        hero.moveXY(target.pos.x, target.pos.y)

# Now, use those functions!
moveRight()
moveDown()
moveUp()
moveUp()
moveRight()

```

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 7:19pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/8 "2021-01-13T19:19:13Z")

</div>

what happened now did it work

---

<div class="post-metadata">

**Author:** ![bladee](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@bladee](https://discourse.codecombat.com/u/bladee)\
**Post date:** [January 13, 2021, 7:19pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/9 "2021-01-13T19:19:55Z")

</div>

I replaced it with `hero.moveXY(target.pos.x, target.pos.y)` but now it’s saying this

 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/f/8/f8be997cd4fc6ee424639e15dbf915dc26602a20.jpeg)

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 7:20pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/10 "2021-01-13T19:20:56Z")

</div>

what happed did you hero move

---

<div class="post-metadata">

**Author:** ![bladee](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@bladee](https://discourse.codecombat.com/u/bladee)\
**Post date:** [January 13, 2021, 7:21pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/11 "2021-01-13T19:21:29Z")

</div>

Nope, it still doesn’t move

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 7:25pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/12 "2021-01-13T19:25:09Z")

</div>

also @bladee but you are in the forest since you don’t have Proglamation III finish the forest then complete the level

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://discourse.codecombat.com/u/abc)\
**Post date:** [January 13, 2021, 8:04pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/13 "2021-01-13T20:04:10Z")

</div>

You get Programaticon 3 in an early desert level.

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 8:06pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/14 "2021-01-13T20:06:57Z")

</div>

and he has proclamation II equipped and he has boots that don’t have move which are required for late forest

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://discourse.codecombat.com/u/abc)\
**Post date:** [January 13, 2021, 8:07pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/15 "2021-01-13T20:07:20Z")

</div>

For each function look at the target variable. Write that for each move statement. The moveRight() function one would be:

```python
hero.moveXY(hero.pos.x + 12, hero.pos.y)

```

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://discourse.codecombat.com/u/abc)\
**Post date:** [January 13, 2021, 8:07pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/16 "2021-01-13T20:07:44Z")

</div>

They are not required for late forest.

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 13, 2021, 8:08pm UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/17 "2021-01-13T20:08:32Z")

</div>

yes they are and you just gave him a direct answer and that is prohibited here

---

<div class="post-metadata">

**Author:** ![WaWa\_Yang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wawa_yang/32/17800_2.png) [@WaWa\_Yang](https://discourse.codecombat.com/u/WaWa_Yang)\
**Post date:** [January 15, 2021, 1:21am UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/18 "2021-01-15T01:21:36Z")

</div>

(hashtag complicated way) lol

---

<div class="post-metadata">

**Author:** ![WaWa\_Yang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wawa_yang/32/17800_2.png) [@WaWa\_Yang](https://discourse.codecombat.com/u/WaWa_Yang)\
**Post date:** [January 15, 2021, 1:22am UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/19 "2021-01-15T01:22:07Z")

</div>

what i use is basic boots , like move right move up move down stuff

---

<div class="post-metadata">

**Author:** ![Eric\_Tang](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/eric_tang/32/15310_2.png) [@Eric\_Tang](https://discourse.codecombat.com/u/Eric_Tang)\
**Post date:** [January 15, 2021, 2:03am UTC](https://discourse.codecombat.com/t/kithgard-enchanter/26597/20 "2021-01-15T02:03:20Z")

</div>

The problem might be because you define target as every single variable so when you use it the system gets confused.

[Next page](https://discourse.codecombat.com/t/kithgard-enchanter/26597.md?page=2)
