- Code: Select all
Starting hard-coded terrain presampling
Nasal runtime error: setprop() passed a NaN
at /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 597
Nasal runtime error: vector index 1 out of bounds (size: 1)
at /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 2109
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 2084
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 2053
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/weather_tiles.nas, line 367
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/weather_tile_management.nas, line 535
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/weather_tile_management.nas, line 158
This first error:
Nasal runtime error: setprop() passed a NaN
at /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 597
is it resolved inserting one line code first:
File: flightgear/fgdata/Nasal/local_weather/local_weather.nas
- Code: Select all
597: setprop("/environment/ground-visibility-m",vis);
598: setprop("/environment/ground-haze-thickness-m",alt2 * ft_to_m);
- Code: Select all
596: if (vis == nil) vis = 1000000.0;
597: setprop("/environment/ground-visibility-m",vis);
598: setprop("/environment/ground-haze-thickness-m",alt2 * ft_to_m);
Note:
I put 100,000, but it would be more elegant to enter the maximum number allowed by this parameter, but I do not know what.
The second error:
Nasal runtime error: vector index 1 out of bounds (size: 1)
at /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 2109
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 2084
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/local_weather.nas, line 2053
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/weather_tiles.nas, line 367
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/weather_tile_management.nas, line 535
called from: /home/abassign/fgfs/install/flightgear/fgdata/Nasal/local_weather/weather_tile_management.nas, line 158
- Code: Select all
2109: if (presampling_flag==1) {alt_base = alt_20_array[tile_index -1];}
It resolves by inserting a check:
- Code: Select all
[code]2109: if (tile_index -1 >= 0) { if (presampling_flag==1) {alt_base = alt_20_array[tile_index -1];}}
The variable alt_base is already initialized so it should not give side effects.
I advise include these simple changes to avoid possible side effects.