Reproduction of this issue is 100% across 30+ launches.
When Periapsis
(or any other ship parameter) does not have a value yet, it is reported as NAN
in the Visual Scripting environment (VIZZY).
Because NAN
is not a number, none of the comparison operators can be used with it, all comparison operators against a NAN value will always return false 100% of the time. This breaks scripts.
Test Case:
- Output Orbit:Periapsis
to the screen for the entire time during flight while Periapsis
is still N/A
on UI Orbit category.
- It will Report NAN
.
The following loop has a 100% failure rate when Periapsis does not have a value yet on UI:
- while(Orbit:Periapsis less than 6000)
- -- loop contents never execute unless periapsis is an actual number
Since NAN is not a number, Comparing (NAN less than 60000
) will always result in false
. This makes various ship parameters unreliable inside Vizzy.
Requested Fix: None of the ship parameters should ever report NAN
in the VSL (VIZZY), they should always report 0 (Zero) when no value (N/A) exists yet.
It is also impossible to check for NAN in the VSL - because there is no way to test if a value is actually a number.