KaukausInsurgency / ki-dcs

Kaukasus Insurgency
5 stars 2 forks source link

Error when scenery object dies #171

Closed Igneous01 closed 6 years ago

Igneous01 commented 6 years ago
16457.565 INFO    SCRIPTING:   5358(    13)/E:               EVENT00000.onEvent({[1]="S_EVENT_DEAD",[2]={["IniUnit"]={["SceneryObject"]={["id_"]=269426036,},["ClassName"]="SCENERY",["SceneryName"]=269426036,},["initiator"]=,["id"]=8,["IniObjectCategory"]=5,["IniUnitName"]=269426036,["IniCategory"]=4,["time"]=40103.557,["IniTypeName"]="SCENERY",["IniDCSUnit"]=,["IniDCSUnitName"]=269426036,},[3]=269426036,[5]=-1,})
16457.565 INFO    SCRIPTING: KI.Hooks.GameEventHandler:onEvent(event) called
16457.565 INFO    SCRIPTING: KI.Hooks.GameEventHandler - DEATH EVENT
16457.565 INFO    SCRIPTING: GameEvent.CreateGameEvent called (sessionID: 74, serverID: 3, dcs_event_obj: true, realTime: 11303.557)
16457.565 INFO    SCRIPTING: KI.Hooks.GameEventHandler ERROR - [string "C:\KIDCS\KIAlpha\DCSScripts\GameEvent.lua"]:82: attempt to call method 'getCoalition' (a nil value)

Need to add a check to either ignore scenery objects or default their coalition to 0.