Today, somebody else sent me the same error message. I couldn't reproduce the crash, but something smells fishy. This is the code in question:https://mods.factorio.com/mod/Bio_Industries/discussion/60d0d35b4907807d4bfeb51e wrote: Error ServerMultiplayerManager.cpp:91: MultiplayerManager failed: "The mod Bio Industries (1.1.10) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Bio_Industries::on_configuration_changed
Bio_Industries/settings_changed.lua:34: attempt to index field '?' (a nil value)
stack traceback:
Bio_Industries/settings_changed.lua:34: in function 'musk_floor'
Code: Select all
29: -- Always use dummy force if option is set
30: if BioInd.UseMuskForce then
31: force = BioInd.MuskForceName
32: -- Singleplayer mode: use force of first player
33: elseif not game.is_multiplayer() then
34: force = game.players[1].force.name
35: -- Multiplayer game
36: else
Trying to reproduce the crash, I added code for debugging messages:
Code: Select all
-- Always use dummy force if option is set
if BioInd.UseMuskForce then
force = BioInd.MuskForceName
-- Singleplayer mode: use force of first player
elseif not game.is_multiplayer() then
BioInd.show("game.is_multiplayer() -- should be single player", game.is_multiplayer())
force = game.players[1].force.name
-- Multiplayer game
else
BioInd.show("game.is_multiplayer() -- should be multiplayer", game.is_multiplayer())
Code: Select all
5623.554 Script @__Bio_Industries__/common.lua:212: Startup settings changed. Calling settings_changed.musk_floor()!
5623.554 Script @__Bio_Industries__/common.lua:212: game.is_multiplayer() -- should be multiplayer: true
Code: Select all
5761.514 Script @__Bio_Industries__/common.lua:212: Startup settings changed. Calling settings_changed.musk_floor()!
5761.514 Script @__Bio_Industries__/common.lua:212: game.is_multiplayer() -- should be multiplayer: true
Code: Select all
/c game.print(game.is_multiplayer())
Basically the same thing happens when I start a new game in singleplayer mode, save, and host it as a multiplayer game:
Code: Select all
-- Logfile:
72.732 Script @__Bio_Industries__/common.lua:212: Startup settings changed. Calling settings_changed.musk_floor()!
72.732 Script @__Bio_Industries__/common.lua:212: game.is_multiplayer() -- should be single player: false
-- Console:
/c game.print(game.is_multiplayer())
true