Ammo Loader+


More than just a turret loader. Auto load everything from turrets to artillery wagons to furnaces and even the player themselves. Auto upgrade ammo and fuel without tedious manual replacement. Infinite range and compatible with Factorissimo2.

Content
16 days ago
0.14 - 1.1
21.2K
Logistics

b Factorio 1.1.18 crash

3 years ago

55.446 Error MainLoop.cpp:1285: Exception at tick 31320689: The mod Ammo Loader+ (1.1.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ammo-loader::on_tick (ID 0)
ammo-loader/lib/TrackedSlot.lua:279: attempt to index field 'player' (a nil value)
stack traceback:
ammo-loader/lib/TrackedSlot.lua:279: in function 'new'
ammo-loader/lib/TrackedSlot.lua:169: in function 'createSlots'
ammo-loader/lib/TrackedSlot.lua:142: in function 'trackAllSlots'
ammo-loader/lib/createdQ.lua:252: in function 'tick'
ammo-loader/lib/Handlers.lua:201: in function <ammo-loader/lib/Handlers.lua:197>

3 years ago

Hi! Thank you for reporting this.

a lot of people have been experiencing the same bug, and I'm currently working on a fix. I'll let you know here when I've got something uploaded

3 years ago

Tx for your work silentcrim.

3 years ago
(updated 3 years ago)

I don't know if this helps, but I clicked the debug flag and every time it crashes, the last 4 commands output to the console are:
[Ammo-Loeader] > player gun changed
[Ammo-Loeader] > cur gun: submachine-gun
[Ammo-Loeader] > cur gun:
[Ammo-Loeader] > created new chest

and then it crashes immediately after that last one. Note.. I didn't do anything (like change a gun!) and was just standing there waiting for the crash..

3 years ago

ok, I'm going to suggest something which I hate, because it's sloppy.. but you can fix the crash by editing the TrackedSlot.lua file. It doesn't fix the problem, but stops the game crashing until SIlentcrim has time to try and work out what's going on (Great mod by the way, silentcrim!!!!)

About line 279 of the file change this block:

if (obj:isCharacter()) then
    Handlers.playerGunChanged({player_index = obj.ent.player.index})
else
    obj:queueUrgentProvCheck()
end

to this:

if (obj:isCharacter()) then
if (obj.ent.player == nil) then
         cInform(
            "Found nil value - skipping"
        )
else
        Handlers.playerGunChanged({player_index = obj.ent.player.index})
end
else
    obj:queueUrgentProvCheck()
end
3 years ago

I just released version 1.1.3 which should fix this issue. Let me know if you have any more problems!

3 years ago

Yeah it s back ! Thanks you silentcrim. For me it s really a nice mod. Have a good sunday.

3 years ago

I'd like to add my thanks.. great mod !!

New response