Weird objGetStaticData problem
Posted: Wed Oct 16, 2013 4:44 am
I am overriding objCanInstallItem to allow some custom device mass checks. (previously I overwrote all installdeviceprep functions, but this should be cleaner).
(objGetStaticData theShip 'maxDeviceMass') is breaking with
(objGetStaticData gPlayership 'maxDeviceMass') isn't.
theShip is a passed parameter. The function is called from rpgInstallDevicePrep in RPGCode.xml with targetObj as the corresponding argument and targetObj is compared for equality with gPlayership so they must be the same data type.
I can conceive of no non-bug reason that objGetStaticData should fail with a passed argument but not with a global variable of the same type.
And I need to be able to get the staticdata off the passed spaceobject rather than hard coding because installation functions can now be called on autons.
(objGetStaticData theShip 'maxDeviceMass') is breaking with
Code: Select all
Function name expected [theShip] ### (objGetStaticData theShip "maxDeviceMass") ###
theShip is a passed parameter. The function is called from rpgInstallDevicePrep in RPGCode.xml with targetObj as the corresponding argument and targetObj is compared for equality with gPlayership so they must be the same data type.
I can conceive of no non-bug reason that objGetStaticData should fail with a passed argument but not with a global variable of the same type.
And I need to be able to get the staticdata off the passed spaceobject rather than hard coding because installation functions can now be called on autons.