K75 requested I post this bug here. Calling GetUnitSettings (Or SetUnitSettings) on a custom unit that does not have a script attached throws an exception. If the unit has a script, it works normally, even if it's completely blank.
Attached is a tiny map that causes this exception to be thrown whenever you advance a gameplay frame as it attempts to call GetUnitSettings on a unit with no scripts attached.
Also the error for reference.
NullReferenceException: Object reference not set to an instance of an object.
at CModUnitManager.GetUnitSettings () [0x00000] in <00000000000000000000000000000000>:0
at CModRplCore.HandleUnitCommands (RplCore+Command command) [0x00000] in <00000000000000000000000000000000>:0
at RplCore.ProcessCommands (System.Boolean start, System.Boolean onceP, System.Boolean final, System.Boolean gameLoaded, System.String eventName, System.Boolean paused) [0x00000] in <00000000000000000000000000000000>:0
at RplCore.GameUpdate (System.Boolean final, System.Boolean paused) [0x00000] in <00000000000000000000000000000000>:0
at CModUnitManager.GameUpdate () [0x00000] in <00000000000000000000000000000000>:0
at GameSpace.MyFixedUpdate () [0x00000] in <00000000000000000000000000000000>:0
at GameSpace.Update () [0x00000] in <00000000000000000000000000000000>:0
K75 requested I post this bug here. Calling GetUnitSettings (Or SetUnitSettings) on a custom unit that does not have a script attached throws an exception. If the unit has a script, it works normally, even if it's completely blank.
Attached is a tiny map that causes this exception to be thrown whenever you advance a gameplay frame as it attempts to call GetUnitSettings on a unit with no scripts attached.
Also the error for reference.
NullReferenceException: Object reference not set to an instance of an object. at CModUnitManager.GetUnitSettings () [0x00000] in <00000000000000000000000000000000>:0 at CModRplCore.HandleUnitCommands (RplCore+Command command) [0x00000] in <00000000000000000000000000000000>:0 at RplCore.ProcessCommands (System.Boolean start, System.Boolean onceP, System.Boolean final, System.Boolean gameLoaded, System.String eventName, System.Boolean paused) [0x00000] in <00000000000000000000000000000000>:0 at RplCore.GameUpdate (System.Boolean final, System.Boolean paused) [0x00000] in <00000000000000000000000000000000>:0 at CModUnitManager.GameUpdate () [0x00000] in <00000000000000000000000000000000>:0 at GameSpace.MyFixedUpdate () [0x00000] in <00000000000000000000000000000000>:0 at GameSpace.Update () [0x00000] in <00000000000000000000000000000000>:0
save.zip