Re: [Flightgear-devel] nasal code problems

2006-03-06 Thread Andy Ross
Justin Smithies wrote: > I seem to have the {} () ; wrong somewhere and maybe some other > little errors. You didn't close the parentheses in the setlistener() call. Every "(" must be matched with a ")" of course. Programmers use indentation conventions (and usually special editors) to help with

Re: [Flightgear-devel] nasal code problems

2006-03-06 Thread Justin Smithies
Fixed it guys ... setlistener("/controls/engines/engine/cutoff", func { var new_cutoff = cmdarg().getBoolValue(); if (new_cutoff == 0 ){ setprop("/controls/engines/engine/reverser", 0); } else { if (new_cutoff == 1 ){ setprop("/controls/engines/engine/reverser", 1); } } }); Now i see how this wo

[Flightgear-devel] nasal code problems

2006-03-06 Thread Justin Smithies
Hi all can someone fix this test script for me and show me the error of my ways. Its just a test so dont panic about what it actually does. Just so i can see how to affect other values using a script and viewing all on the same http page of the property tree makes it easier for me. setlistener