Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

Bug: MUN:POSITION:MAG and MUN:DISTANCE type mismatch #244

Open baloan opened 10 years ago

baloan commented 10 years ago
print MUN:POSITION:MAG.
11529348.0912514
print MUN:DISTANCE.
1.107228E+07
print MUN:POSITION:MAG - MUN:DISTANCE.
Can't subtract number from number.

Or am I missing something?

Dunbaratu commented 10 years ago

In the past I found that adding or subtracting other terms can sometimes force KOS to cast types. (i.e. "" + ENCOUNTER turns encounter into a string regardless of whether it's "None" or not.).

Until this gets fixed perhaps you can try some variant of that and see what might work, i.e: 0 + MUN:POSITION:MAG. or 0 + MUN:DISTANCE.

To see if something like that will force one to cast into the other's type.

baloan commented 10 years ago
print 0+MUN:POSITION:MAG.
11529348.0912514
print 0+MUN:DISTANCE.
Can't add number from number.