Help! Blind Distance

Help!!! I can’t pass Blind Distance because it says “Cannot read property ‘start’ of undefined”
My code is

Can I see your code it’s a bit hard to see the code in the picture.

Hi! Your code is very close to victory, but 17th line is problem one. Don’t want to offend you, but looks like you don’t understand meaning and purpose of functions and variables) Try to renew you knowledge about this stuff, and then work over 17th line: replace some parts or some kind of this… Good luck!

@Numyevenodd_Gaming

Variables store data the following way:

Storage = Value

So when you are writing code make sure that the storage is always on the left of the " = "

Omg, I totally didn’t notice! Thanks so much!!!

Need help!

I do not know my problem but the distance is greater than 0 is my problem, that’s all I can say.

It’s a bug for all I know I have the best glasses in the game and it still doesn’t work what I did is

``````while True:
enemy = hero.findNearestEnemy()
if enemy:
distance = hero.distanceTo(enemy)
if distance <= 10:
hero.say("10")

``````

What is `distance` in your code? You save the result to `enemyDistance`.

Nope, it’s a problem with the solution

Oh found that.
20 characters

So, how would I fix it? I been stuck on that level forever.

Use the real variable with a value. You haven’t defined the variable `distance`, only `enemyDistance`. I suppose you should revise some early levels about variables.

Hey, i’m trying to complete Blind Distance, but i don’t know what to do. i tried looking at solutions for Blind Distance, but really couldn’t understand. plz help!

Can someone help me, plz?

There’s only two lines of code you need to write and the directions tell you what to do.

``````# If the enemyDistance is greater than 0:
``````

Write this. Then, on the second line:

``````# Say the value of enemyDistance variable.
``````

Write this and you’re done.

those lines are already put in the coding i just need to know what to put below them

We don’t provide solutions here. We assist you with learning by helping to troubleshoot your code. Simply providing solutions is counter productive to the learning process. There are many people here willing and able to assist you, but we do not just provide solutions.

As I stated before, there are just two lines of code you need to write and the commented hints tell you what to do. Have you tried anything at all? If so, please post your code and we’ll be happy to straighten out any problems. Remember to use the </> button so it formats properly.

I am stuck on the same level to. I would love some assistance on this level please.