Code to reproduce:
Code: Select all
script.on_event(defines.events.on_gui_click, function(event)
error("oops")
end)
script.on_init(function(event)
for name, player in pairs(game.players) do
player.gui.center.add{type = "button", name = "crash_button", caption = "Click me!"}
end
end)