agl: need to check for nil
This commit is contained in:
parent
dfd21c722d
commit
095e3e717e
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||||
return;
|
return;
|
||||||
if (getprop("/sim/presets/airport-id") == "KSFO" and rwy == "28R")
|
if (getprop("/sim/presets/airport-id") == "KSFO" and rwy == "28R")
|
||||||
return;
|
return;
|
||||||
if (getprop("/position/altitude-agl-ft") > 100)
|
if ((var agl = getprop("/position/altitude-agl-ft")) != nil and agl > 100)
|
||||||
return;
|
return;
|
||||||
atc.setValue("You are on runway " ~ rwy);
|
atc.setValue("You are on runway " ~ rwy);
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue