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!



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:


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

Nope, it’s a problem with the solution :slight_smile:


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.