Code: Select all
require "defines"
script.on_event(defines.events.on_tick, function(event)
if #game.players > 0 and event.tick % 60 == 0 then game.player.print("foo") end
end)
Have someone join.
Close the resulting error message on the second system. This properly returns to the menu.
Watch the "peers are not responding" bar fill.
Once the second player gets dropped, the game crashes with this helpful stacktrace:
Code: Select all
44.844 Warning Thread.cpp:42: Thread exception: Error while running the event handler: __bla__/control.lua:9: Map doesn't contain 1 player, this function can't be used.
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0 0x7f06ffd212f0 in ?? at ??:0
#1 0x7f070087abc9 in ?? at ??:0
46.713 Error Util.cpp:78: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.