Auto Fill

by Nexela

Autofill inserts items (ammo,fuel,etc) inside entities when placing them in the world.

Utilities
6 years ago
0.13 - 0.16
357

g Bug on 0.16.5?

6 years ago

Well, I have a bug today after updating factorio. It pops up right after I have logged into the game. Here are the two errors:

autofill/autofill/sets.lua:73:attempt to index field 'forces' (a nil value)
autofill/changes.lua:34: bad argument #0 to 'log' (Wrong number of arguments.)

And after I place a vanilla turret down, it gives this error:

autofill/autofill/autofill.lua:53:attempt to index local 'pdata' (a nil value)

6 years ago

I get the same error, including when I place other entities (such as splitters).

6 years ago

Same here

6 years ago

same with 16.6

6 years ago

Ditto, it's not working at all for me.

6 years ago

Will be addressed soon

6 years ago

Thanks.

6 years ago

Thanks.

6 years ago

bump

Just wanted to see if there was any progress fixing this issue.

6 years ago

Issue still occurs in 0.16.36

6 years ago

Issue still occurs in 0.16.36.

6 years ago

Still occurs in 0.16.41. :(

6 years ago

Still present, hoping for an update!

6 years ago

This issue can be fixed by modifying the autofill/autofill.lua source file. Add this line at the top of the file:

local Player = require("stdlib.event.player")

Then you need to add a few lines in the autofill function:

local function autofill(event)
local entity = event.created_entity
local player, pdata = game.players[event.player_index], global.players[event.player_index]
-- NEW LINES BELOW!!
if pdata == nil then
Player.init(nil, false)
player, pdata = game.players[event.player_index], global.players[event.player_index]
end

6 years ago

@Lundis999 thank you, that worked

6 years ago

As a side note on this bug, it only happens for me when I open an old save, does not occur on a new game. Also thanks @Lundis999, fix worked like a charm.

New response