I am seeing this failure occasionally but I don't know how to reproduce it:
Linux headless server, running custom scenario, no mods, map was started sometime between .35 and .37 updates I think.
Code: Select all
69711.329 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The scenario level caused a non-recoverable error.
Please report this error to the scenario author.
Error while running event level::on_built_entity (ID 6)
real number expected got nil.
stack traceback:
..._0.17/factorio/temp/currently-playing/lib/oarc_utils.lua:697: in function 'AutofillTurret'
..._0.17/factorio/temp/currently-playing/lib/oarc_utils.lua:955: in function 'Autofill'
...actorio_0.17/factorio/temp/currently-playing/control.lua:216: in function <...actorio_0.17/factorio/temp/currently-playing/control.lua:214>
stack traceback:
[C]: in function 'get_inventory'
..._0.17/factorio/temp/currently-playing/lib/oarc_utils.lua:697: in function 'AutofillTurret'
..._0.17/factorio/temp/currently-playing/lib/oarc_utils.lua:955: in function 'Autofill'
...actorio_0.17/factorio/temp/currently-playing/control.lua:216: in function <...actorio_0.17/factorio/temp/currently-playing/control.lua:214>
69711.329 Info ServerMultiplayerManager.cpp:776: updateTick(3474305) changing state from(InGame) to(Failed)
69711.329 Quitting: multiplayer error.
Code: Select all
local mainInv = player.get_inventory(defines.inventory.character_main)
My expectation is that regardless of the player's state, character is dead/alive/god-mode, the get_inventory function should at worst return nil.
I am not writing or changing defines.inventory anywhere. I am using a scenario only, no mods.
I am not sure if this is a bug, but from my understanding of this error report, it is saying that I am passing get_inventory nil, instead of a number?