I have gotten a bug pop up from one of the users of my mod https://mods.factorio.com/mod/expanded- ... 000b5871c0
They say:
When i coded my mod the only place I can remember working with the Silo Scrips was in the Control.lua which looks like this:Once I shot my first one into space, the server which i host crashed with the following message when normally the space science appears (indented and spaced for clarity):
Error MainLoop.cpp:1035:
Exception at tick 160017902:
Error while running event expanded-rocket-payloads::on_rocket_launched (ID 10)
Unknown interface: silo_script
stack traceback:
expanded-rocket-payloads/control.lua:4: in function <expanded-rocket-payloads/control.lua:1>
Error ServerMultiplayerManager.cpp:96: MultiplayerManager failed: "Error while running event expanded-rocket-payloads::on_rocket_launched (ID 10)
Unknown interface: silo_script
stack traceback:
expanded-rocket-payloads/control.lua:4: in function <expanded-rocket-payloads/control.lua:1>"
Info ServerMultiplayerManager.cpp:699: mapTick(160017902) changing state from(InGame) to(Failed)
=====
I am using version 0.16.5. When the server crashed, I manually saved on my client.
1: When i load this savefile on the server the error makes the server crash on the first tick
2: Loading it in singleplayer does the same (just making sure)
3: When updating the mod to the latest version (0.16.6), the crash persists.
After some careful analyzing, I discovered that the silo_script isn't present in any of the saves generated by a custom scenario (FactorioScenarioMultiplayerSpawn). So it might not be your fault. But I can't find anything in their code that removes that interface.
4: global.silo_script is also nill if remote.interfaces.silo_script is missing
Code: Select all
script.on_event(defines.events.on_rocket_launched, function(event)
local rocket = event.rocket
if rocket.get_item_count("satellite") < 1 then
remote.call("silo_script", "set_show_launched_without_satellite", false)
end
end)
script.on_init(setup_remote_call)
script.on_configuration_changed(setup_remote_call)
function setup_remote_call()
remote.call(interface_name, "set_show_launched_without_satellite", false)
end
script.on_event(defines.events.on_research_finished, function(event)
if event.research.name == 'improved-space-program-theory' then
function setup_remote_call()
remote.call(interface_name, "set_show_launched_without_satellite", false)
end
end
end)
script.on_event(defines.events.on_research_finished, function(event)
if event.research.name == 'satellite-tracking' then
remote.call("silo_script", "add_tracked_item", "advanced-probe")
remote.call("silo_script", "add_tracked_item", "space-lab")
remote.call("silo_script", "add_tracked_item", "space-telescope")
remote.call("silo_script", "add_tracked_item", "space-shuttle")
remote.call("silo_script", "add_tracked_item", "spy-shuttle")
remote.call("silo_script", "add_tracked_item", "mining-shuttle")
remote.call("silo_script", "add_tracked_item", "orbital-solar-collector")
remote.call("silo_script", "add_tracked_item", "observation-satellite")
remote.call("silo_script", "add_tracked_item", "fabricator-shuttle")
end
end)
I don't know how to fix this, help please!