# The Final Kithmaze Help!

**URL:** <https://discourse.codecombat.com/t/the-final-kithmaze-help/4492>\
**Category:** Uncategorized\
**Created:** [July 15, 2015, 3:25pm UTC](https://discourse.codecombat.com/t/the-final-kithmaze-help/4492 "2015-07-15T15:25:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksj00](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@ksj00](https://discourse.codecombat.com/u/ksj00)\
**Post date:** [July 15, 2015, 3:25pm UTC](https://discourse.codecombat.com/t/the-final-kithmaze-help/4492/1 "2015-07-15T15:25:47Z")

</div>

Hi,

I have a problem with the code and I come up with an error message saying, “Line 6: tmp13[tmp14] is not a function.”

Here’s my code:

loop {  
this.moveRight();  
this.moveUp();  
var enemy = this.findNearestEnemy();

this.attack(enemy);  
this.attack(enemy);  
this.moveRight();  
this.moveDown();  
this.moveDown();  
this.moveUp();  
}

---

<div class="post-metadata">

**Author:** ![J\_F\_B\_M](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/j_f_b_m/32/2756_2.png) [@J\_F\_B\_M](https://discourse.codecombat.com/u/J_F_B_M)\
**Post date:** [July 15, 2015, 7:46pm UTC](https://discourse.codecombat.com/t/the-final-kithmaze-help/4492/2 "2015-07-15T19:46:00Z")

</div>

Hi ksj00,  
please format your code correctly, as described in the FAQ. In the current state it is hard to read, so you will receive less help than with well formatted code.

* * *

To solve this problem we need to know your current equipment, especially your **Glasses** , **Boots** and **Weapon**.

Please check on all the mentioned equipment pieces whether they have the methods you used. If you for example bought new glasses they might not have the `findNearestEnemy`-Method, but instead use `findNearest` and `findEnemies`.

---

<div class="post-metadata">

**Author:** ![ksj00](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@ksj00](https://discourse.codecombat.com/u/ksj00)\
**Post date:** [July 15, 2015, 7:47pm UTC](https://discourse.codecombat.com/t/the-final-kithmaze-help/4492/3 "2015-07-15T19:47:36Z")

</div>

Thanks!!! That will really help!

---

<div class="post-metadata">

**Author:** ![ksj00](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@ksj00](https://discourse.codecombat.com/u/ksj00)\
**Post date:** [July 15, 2015, 7:52pm UTC](https://discourse.codecombat.com/t/the-final-kithmaze-help/4492/4 "2015-07-15T19:52:11Z")

</div>

Sorry forgot to add…

**Glasses** - Crude Glasses  
**Boots** -Simple Boots  
**Weapon** -Simple Sword

With that last paragraph of what you said, should I use the

> [@](#):
>
> findEnemies and findNearest instead?

---

<div class="post-metadata">

**Author:** ![ksj00](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@ksj00](https://discourse.codecombat.com/u/ksj00)\
**Post date:** [July 15, 2015, 7:57pm UTC](https://discourse.codecombat.com/t/the-final-kithmaze-help/4492/5 "2015-07-15T19:57:11Z")

</div>

Hi J\_F\_B\_M

Figured it out!

Thanks so much!!
