Hi,
For some reason, I'm getting a CTD when I shoot one of my created units.
I've created 8 new unit types, but for some reason it only seems to crashed on the two red unit types - 1 biter and 1 spitter...
I've attached the MOD, Save and LOG. the Mod has not yet been published.
Thanks.
[0.17.2] Crash when shooting a unit: "Unset shooting target" (modded)
[0.17.2] Crash when shooting a unit: "Unset shooting target" (modded)
- Attachments
-
- Crash.zip
- (1.38 MiB) Downloaded 40 times
-
- Natural_Evolution_Enemies_0.17.0.zip
- (1.34 MiB) Downloaded 41 times
-
- factorio-current.log
- (12.08 KiB) Downloaded 51 times
Re: [0.17.2] Crash when shooting a unit - MOD
Are you doing something specific on death of those units?
While game should not crash it seems that there is something really weird going on in death handler.
While game should not crash it seems that there is something really weird going on in death handler.
Re: [0.17.2] Crash when shooting a unit - MOD
Okay, so yes I am doing some stuff in control.
I have these and this is causing the problem:
I have these and this is causing the problem:
Code: Select all
--- Check for Fire Biter
function isFireBiter(entity)
return (string.find(entity.name, "ne%-biter%-fire%-") or string.find(entity.name, "ne%-spitter%-fire%-"))
end
Code: Select all
local function On_Death(event)
....
if isFireBiter(entity) and entity.type == "unit" and UnitNumber(entity) ~= nil then
if math.floor(UnitNumber(entity)) < 5 then
surface.create_entity({name="ne-small-fire-explosion", position = pos, force = "enemy"})
elseif math.floor(UnitNumber(entity)) < 15 then
surface.create_entity({name="ne-medium-fire-explosion", position = pos, force = "enemy"})
else
surface.create_entity({name="ne-big-fire-explosion", position = pos, force = "enemy"})
end
end
end
Re: [0.17.2] Crash when shooting a unit - MOD
So it's something to do with my fire-explosion creation, but what I'm having a hard time determining...
Re: [0.17.2] Crash when shooting a unit - MOD
I think dev will need to take a look. I have no idea what could be FluidBox doing in that call stack 

Re: [0.17.2] Crash when shooting a unit: "Unset shooting target" (modded)
Thanks for the report.
This should be fixed as of 0.17.12 or 0.17.13
This should be fixed as of 0.17.12 or 0.17.13