Re: [Flightgear-devel] Nasal: Creating a new node

2011-06-27 Thread xsaint
Got it working Thank you all On Friday 24,June,2011 08:38 PM, syd adams wrote: Try this: var myTempNode = props.globals.initNode(/sim/temp/TempNode, 50,INT); myTempNode.setValue(getprop(instrumentation[0]/altimeter/indicated-altitude-ft)); The code i am using var myTempNode =

Re: [Flightgear-devel] Nasal: Creating a new node

2011-06-26 Thread xsaint
Thank you all... Got it working now cheers On Friday 24,June,2011 08:38 PM, syd adams wrote: Try this: var myTempNode = props.globals.initNode(/sim/temp/TempNode, 50,INT); myTempNode.setValue(getprop(instrumentation[0]/altimeter/indicated-altitude-ft)); The code i am using var

[Flightgear-devel] Nasal: Creating a new node

2011-06-24 Thread xsaint
Good day, I am attempting to create a new node via nasal I will like to call the node as TempNode with a int value of 50 and i will like to create it at /sim[0]/temp/. If the node was created, it will look like /sim[0]/temp/TempNode with a value of 50 I am very much confused with nasal and i

Re: [Flightgear-devel] Nasal: Creating a new node

2011-06-24 Thread Torsten Dreyer
Am 24.06.11 09:22, schrieb xsaint: Good day, I am attempting to create a new node via nasal I will like to call the node as TempNode with a int value of 50 and i will like to create it at /sim[0]/temp/. If the node was created, it will look like /sim[0]/temp/TempNode with a value of 50 I

Re: [Flightgear-devel] Nasal: Creating a new node

2011-06-24 Thread xsaint
Thank you Torsten, I guess that is bringing me closer to what i am trying to code Now i am trying to copy the value of instrumentation[0]/altimeter/indicated-altitude-ft into /sim/temp/TempNode and below the code i have but it gives me nasal error as Nasal runtime error: setprop() value

Re: [Flightgear-devel] Nasal: Creating a new node

2011-06-24 Thread syd adams
Try this: var myTempNode = props.globals.initNode(/sim/temp/TempNode, 50,INT); myTempNode.setValue(getprop(instrumentation[0]/altimeter/indicated-altitude-ft)); The code i am using var myTempNode = props.globals.getNode(/sim/temp/TempNode, 1,); remove comma at the end.