Hi there,

On Jun 15, 2009, at 4:12 AM, Torsten Dreyer wrote:

>> I've had another error message for the last few weeks while starting FG ,
>>
>>
>> Nasal runtime error: nil used in numeric context
>> at data/Nasal/startup.nas , line 12

I've encountered exactly the same problem.
I'm not so sure what it should look like, but at least it needs nil check for 
the property.
Another solution can be setting 0 to the property at the beginning.

setprop("/environment/metar/base-wind-speed-kt", 0.0);

before set_runway_from_metar_wind() is called.

Melchior, what do you think is the better solution for this?

Tat



>>
>> so it looks like "environment/metar/base-wind-speed-kt" is still nil when
>> read the first time ...
>> I fixed it locally , but not sure who added it , so I'll leave it alone
>
> That's my fault for sure. This node is not initialized before a valid metar 
> has been decoded. The boolean property /environment/metar/valid is true if 
> the properties under /environment/metar are filled from a valid metar.
> So - if a valid metar has not (yet) been received from noaa, there is no 
> wind-speed and no wind-range.
>
> Probably startup.nas should wait for /environment/metar/valid to become true 
> before using the wind-speed and wind-range nodes.
>
> Maybe Melchior has a good idea how to do this?
>
> Torsten
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to