Closed Razgriz1 closed 1 year ago
Are you aware of any other variables that cause issues? I suppose v
would also be an offender. I'd rather do a simple search&replace, it seems like a cleaner solution.
I found r
, v
, q
, and mass
Seriously there's a builtin called mass
?
Alright, I'm gonna have to update to 1.4 and see all this for myself.
Thanks for looking into it.
Yeah it's short for SHIP:MASS
As of kOS v1.4.0.0, the default behavior of kOS does not allow for variables to be named the same as a built-in function. In particular, this breaks scripts that use
r
as a variable, as that conflicts with the functionR()
which creates a direction based on an Euler rotation. As PEGAS usesr
as a variable, this causes the script to crash on newer versions of kOS.Alongside this change, the
@CLOBBERBUILTINS
directive was added, that restores the old functionality and lets variables overwrite the built-in function. In order for PEGAS to work on newer versions of kOS, either@CLOBBERBUILTINS on
directive must be added to the top of any of the files that require the use of ther
variable (similar to the@LAZYGLOBAL
directive), orr
must be changed to not conflict with theR()
function. This is the recommended fix by the kOS devs.