# Need Help in Blind Distance\[SOLVED\]

**URL:** <https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203>\
**Category:** Level Help\
**Created:** [December 20, 2020, 3:24pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203 "2020-12-20T15:24:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reyansh\_Tandon](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/reyansh_tandon/32/17771_2.png) [@Reyansh\_Tandon](https://discourse.codecombat.com/u/Reyansh_Tandon)\
**Post date:** [December 20, 2020, 3:24pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/1 "2020-12-20T15:24:25Z")

</div>

Continuing the discussion from [[SOLVED] Python Blind Distance](https://discourse.codecombat.com/t/solved-python-blind-distance/11338):

while True:

```
enemyDistance = nearestEnemyDistance()
# If the enemyDistance is greater than 0: 
if hero.distanceTo > 0:
    
    # Say the value of enemyDistance variable.
    hero.say(enemyDistance)

```

I don’t know what I have to do to fix it… giving me errors

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [December 20, 2020, 3:37pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/2 "2020-12-20T15:37:13Z")

</div>

> [@Reyansh\_Tandon](#):
>
> `hero.distanceTo`

change that to enemyDistance it should work

---

<div class="post-metadata">

**Author:** ![cheddarcheese](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cheddarcheese/32/22417_2.png) [@cheddarcheese](https://discourse.codecombat.com/u/cheddarcheese)\
**Post date:** [December 20, 2020, 3:44pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/3 "2020-12-20T15:44:54Z")

</div>

and also:

Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review [this topic](https://discourse.codecombat.com/t/welcome-to-codecombat-discourse-forums/15601), which shows all essentials of this board! Thanks!

---

<div class="post-metadata">

**Author:** ![Reyansh\_Tandon](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/reyansh_tandon/32/17771_2.png) [@Reyansh\_Tandon](https://discourse.codecombat.com/u/Reyansh_Tandon)\
**Post date:** [December 20, 2020, 3:57pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/4 "2020-12-20T15:57:17Z")

</div>

it is not doing anything

```
![Screen Shot 2020-12-20 at 9.56.47 AM|690x268](upload://8svCnpKnyFD7yf5Lns5adsJmcf.jpeg)
```

---

<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:** [December 20, 2020, 4:12pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/5 "2020-12-20T16:12:42Z")

</div>

Then can you post yourr code.

---

<div class="post-metadata">

**Author:** ![Reyansh\_Tandon](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/reyansh_tandon/32/17771_2.png) [@Reyansh\_Tandon](https://discourse.codecombat.com/u/Reyansh_Tandon)\
**Post date:** [December 20, 2020, 4:13pm UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/6 "2020-12-20T16:13:20Z")

</div>

sry I got it fixed… forgot to indent

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a9445509d1a758c41b5ddcddc8c8e20a5dedb67f.png) [@system](https://discourse.codecombat.com/u/system)\
**Post date:** [December 21, 2020, 4:13am UTC](https://discourse.codecombat.com/t/need-help-in-blind-distance-solved/26203/7 "2020-12-21T04:13:21Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
