The script I mentioned, is suitable for 747 (3 tanks). Nasal scripts
provides the function foreach() but I forgot how to use it, so I did for
each tank the same operation. You need to change the script so it
matches characteristcs for your aircraft.
Daniel Pekelharing wrote:
> On Fri, 2006-10-06 at 19:30 -0400, Ampere K. Hardraade wrote:
>
>> The problem probably stems from the following lines:
>>
>> capacityTank0 = getprop("/consumables/fuel/tank[0]/capacity-gal_us");
>> capacityTank1 = getprop("/consumables/fuel/tank[1]/capacity-gal_us");
>> capacityTank2 = getprop("/consumables/fuel/tank[2]/capacity-gal_us");
>>
>> I think, if your aircraft only has two tanks, for example, then
>> capacityTank2
>> would be set to null (because the
>> property "/consumables/fuel/tank[2]/capacity-gal_us" wouldn't exist). Then
>> in the comparesion in the later lines, in particular:
>>
>> if (newLevelTank2 > capacityTank2)...
>>
>> would give you that "nil used in numeric context" message.
>>
>
> Perhaps.. On closer observation I've noticed that none of the aircraft
> on my system have the property:
> "/consumables/fuel/tank[x]/capacity-gal_us" when browsing via the
> properties browser ... maybe this is the problem?
>
>
>
> Daniel Pekelharing
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Flightgear-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-users
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users