482
edits
(→Resource: aadded more about programming tips) |
|||
Line 309: | Line 309: | ||
print("Just", " a ", "test"); | print("Just", " a ", "test"); | ||
* You can display info in FlightGear via a popup: | * You can display info in FlightGear via a popup. This is useful for giving the user feedback about changes that may not be obvious via the panel. It can also be useful for debugging. Example: | ||
gui.popupTip("Parking Brake ON"); | gui.popupTip("Parking Brake ON"); | ||
Line 320: | Line 320: | ||
x = 10; | x = 10; | ||
But [http://wiki.flightgear.org/index.php/Nasal_scripting_language#Variables for various reasons] it is much better to declare | But [http://wiki.flightgear.org/index.php/Nasal_scripting_language#Variables for various reasons] it is much better to declare variables with the "var" statement: | ||
var x = 10; | var x = 10; | ||
==Resource== | ==Resource== | ||
* [http://www.flightgear.org/Docs/getstart/getstartch3.html#x8-360003.6 The FlightGear Manual] | * [http://www.flightgear.org/Docs/getstart/getstartch3.html#x8-360003.6 The FlightGear Manual] |
edits