Nil Value Error on long straight with downward slope

I’ll try to look into it during next week.