Gun Equipment


Mode add automatic guns applyable to equipment grid.

Content
4 days ago
1.0 - 2.0
40.5K
Combat Armor

b [Testing] Crash on entity destroyed

4 years ago

The game crash when I destroy some item using a "thrower inserter" from the "Lob" mod (https://mods.factorio.com/mod/lob)!

Log:


221.290 Script @attach-notes/framework.lua:71: 42084116 [AN] on_built_entity {created_entity = "LuaEntity<thrower-inserter : inserter>", item = "LuaItemPrototype<thrower-inserter : item>", name = "6", player_index = "1", stack = "LuaItemStack<thrower-inserter : item>", tick = "42084116"}
222.926 Error MainLoop.cpp:1207: Exception at tick 42084214: The mod Gun Equipment (0.0.12) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event GunEquipment::on_entity_destroyed (ID 155)
GunEquipment/AutoGun/control.lua:245: table index is nil
stack traceback:
GunEquipment/AutoGun/control.lua:245: in function 'OnEntityEnded'
GunEquipment/control.lua:39: in function <GunEquipment/control.lua:38>


Thanks.

4 years ago

Hi,

Any news regarding this bug?

Thanks.

4 years ago

Ok, I will test it in near days, If you have some ideas, let me know.

4 years ago

I changed a little this mod and is not crashing anymore, but I don't know if I broke something:

..\AutoGun\control.lua:

function AutoGun.OnEntityEnded(unit_number)
if AutoGun.vehicles[unit_number] then
AutoGun.vehicles[unit_number] = nil
end
end


Thanks

4 years ago

Thanks for help, this issue is caused by missing unit_number of entity. I do not understand why in 'if' statement is working, but you realized the point of error.

New response