# \[SOLVED\] Need help on Range Finder

**URL:** <https://discourse.codecombat.com/t/solved-need-help-on-range-finder/17691>\
**Category:** Level Help\
**Created:** [March 3, 2019, 12:41am UTC](https://discourse.codecombat.com/t/solved-need-help-on-range-finder/17691 "2019-03-03T00:41:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jxckal](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jxckal/32/9805_2.png) [@Jxckal](https://discourse.codecombat.com/u/Jxckal)\
**Post date:** [March 3, 2019, 12:41am UTC](https://discourse.codecombat.com/t/solved-need-help-on-range-finder/17691/1 "2019-03-03T00:41:55Z")

</div>

I am on the level range finder and I have everything correct accept for that I cant find the positon i type in hero.say(" "); but it doesnt show me the position to attack.

---

<div class="post-metadata">

**Author:** ![Chaboi\_3000](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/chaboi_3000/32/48486_2.png) [@Chaboi\_3000](https://discourse.codecombat.com/u/Chaboi_3000)\
**Post date:** [March 3, 2019, 6:54am UTC](https://discourse.codecombat.com/t/solved-need-help-on-range-finder/17691/2 "2019-03-03T06:54:47Z")

</div>

You’re trying to find the distance, not the position. To find the distance of the target, you need to use this format. Be sure to check if that target exists too.

```python
Distance=hero.distanceTo(target)

```

---

<div class="post-metadata">

**Author:** ![Jxckal](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jxckal/32/9805_2.png) [@Jxckal](https://discourse.codecombat.com/u/Jxckal)\
**Post date:** [March 4, 2019, 3:08pm UTC](https://discourse.codecombat.com/t/solved-need-help-on-range-finder/17691/3 "2019-03-04T15:08:55Z")

</div>

It says "Find and say the distance to enemy4 " wouldn’t that mean i would use the hero.say to do it. I tried to do Var distance = hero.distanceTo(Target) but it said.  
Argument error: DistanceTo’s argument target should have type object, but got null. DistanceTo target is null. Does the target exist?(Use if?)  
I read the hints and did it a couple of times and everytime i did it came back with this same text.  
How should i go about fixing this.

---

<div class="post-metadata">

**Author:** ![Jxckal](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jxckal/32/9805_2.png) [@Jxckal](https://discourse.codecombat.com/u/Jxckal)\
**Post date:** [March 4, 2019, 3:19pm UTC](https://discourse.codecombat.com/t/solved-need-help-on-range-finder/17691/4 "2019-03-04T15:19:08Z")

</div>

I found out what I was doing wrong I needed to put  
hero.say(distance2);  
Thanks for your help i shouldve been more specific of my problem.
