- Code: Select all
Nasal runtime error: nil used in numeric context
at /usr/share/games/FlightGear/Aircraft/dc3/Nasal/electrical.nas, line 369
called from: /usr/share/games/FlightGear/Aircraft/dc3/Nasal/electrical.nas, line 291
called from: /usr/share/games/FlightGear/Aircraft/dc3/Nasal/electrical.nas, line 390
then I switched in electrical.nas1 and ran it again (we will keep this one, btw)
- Code: Select all
Nasal runtime error: No such member: getBoolValue
at /usr/share/games/FlightGear/Aircraft/dc3/Nasal/electrical.nas, line 302
called from: /usr/share/games/FlightGear/Aircraft/dc3/Nasal/electrical.nas, line 176
called from: /usr/share/games/FlightGear/Aircraft/dc3/Nasal/electrical.nas, line 420
Looking at line 302 in electrical.nas(1) it wants controls/lighting/instrument-lights so I added a block to the -set file making this boolean value exist.
Now the ky196s work. Just noticed they are on the main bus not the avionics bus in this electrical system. So you must turn on the battery or the generator for engine[0] or engine[1].
For the KNS80 I added the lines below to electrical.nas (1), somewhere around line 390
- Code: Select all
if(INSTR.getNode("kns-80[0]/serviceable").getBoolValue()){
load +=bus_volts* 0.05;
OutPuts.getNode("KNS80",1).setValue(bus_volts);
}else{
OutPuts.getNode("KNS80",1).setValue(0.0);
}