First attempt at generating a flight plan

I get an error at line 63 (for loop), any ideas why?