# Error for enemy = hero:findNearestEnemy(), The kithard dungeons, The gauntlet A

**URL:** <https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027>\
**Category:** Bugs\
**Created:** [November 23, 2017, 8:50pm UTC](https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027 "2017-11-23T20:50:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jagsplay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jagsplay/32/7129_2.png) [@Jagsplay](https://discourse.codecombat.com/u/Jagsplay)\
**Post date:** [November 23, 2017, 8:50pm UTC](https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027/1 "2017-11-23T20:50:35Z")

</div>

Hello, When I try to use the command enemy = hero:findNearestEnemy() in The Gauntlet A, Kithard Dungeons it says "There is no enemy. Use enemy = hero:findNearestEnemy() first. But I have am I doing something wrong or is the programming wrong since I am using lua.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/7/76b66be614d7862341496be07084e68ed5ab3ea9.jpg)

---

<div class="post-metadata">

**Author:** ![Miarc](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@Miarc](https://discourse.codecombat.com/u/Miarc)\
**Post date:** [November 23, 2017, 9:51pm UTC](https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027/2 "2017-11-23T21:51:38Z")

</div>

Hello

I’m seeing a whitespace on the 3rd line. Try to remove it.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Jagsplay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jagsplay/32/7129_2.png) [@Jagsplay](https://discourse.codecombat.com/u/Jagsplay)\
**Post date:** [November 27, 2017, 6:47pm UTC](https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027/3 "2017-11-27T18:47:15Z")

</div>

Where is the white space?

---

<div class="post-metadata">

**Author:** ![MunkeyShynes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munkeyshynes/32/9277_2.png) [@MunkeyShynes](https://discourse.codecombat.com/u/MunkeyShynes)\
**Post date:** [November 27, 2017, 6:54pm UTC](https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027/4 "2017-11-27T18:54:24Z")

</div>

Line 3 should be:

```python
enemy = hero:findNearestEnemy()

```

You have:

```python
e nemy = hero:findNearestEnemy()

```

A space is a character. A space where one should not be is considered unwanted whitespace.

---

<div class="post-metadata">

**Author:** ![Jagsplay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jagsplay/32/7129_2.png) [@Jagsplay](https://discourse.codecombat.com/u/Jagsplay)\
**Post date:** [November 27, 2017, 7:21pm UTC](https://discourse.codecombat.com/t/error-for-enemy-hero-findnearestenemy-the-kithard-dungeons-the-gauntlet-a/13027/5 "2017-11-27T19:21:37Z")

</div>

Thank you for helping me
