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 is not string or number
   at /usr/share/games/FlightGear/Aircraft/SSJ/Nasal/systems.nas, line 445"


The code i am using....
var myTempNode = props.globals.getNode("/sim/temp/TempNode", 1,);
myTempNode.setIntValue( 50 );
setprop("/sim/temp/TempNode",getprop("instrumentation[0]/altimeter/indicated-altitude-ft"));


Could you please guide me on where i am going wrong please?


Thank you


On Friday 24,June,2011 05:23 PM, Torsten Dreyer wrote:
> 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 am very much confused with nasal and i was wondering how do i create
>> such a node.
>>
>> props.Node.new("/sim[0]/temp/TempNode",50);  ???
>>
>>
> if you want to access TempNode often in your nasal, use
>
> var myTempNode = props.globals.getNode("/sim/temp/TempNode", 1);
> myTempNode.setIntValue( 50 );
>
>
> or if you just set the node's value once:
>
> setprop( "/sim/temp/TempNode", 50 );
>
> Torsten
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense..
> http://p.sf.net/sfu/splunk-d2d-c1
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to