Code: Select all
local use_train = settings.global["loader-use-trains"].value script.on_load(function() if global.loaders and next(global.loaders) then script.on_event(defines.events.on_tick, ticker) end if use_train == "disabled" then script.on_event(defines.events.on_train_changed_state, nil) script.on_event(defines.events.on_train_created, nil) else script.on_event(defines.events.on_train_changed_state, train_update) script.on_event(defines.events.on_train_created, train_update) end end)
Shouldn't global settings be synchronized before running on_load?Checksum for script LoaderRedux/control.lua: 1212318411
233.645 Error ClientMultiplayerManager.cpp:950: mod-LoaderRedux was not registered for the following events when the map was saved but has registered them as a result of loading: on_train_changed_state (ID 23) and on_train_created (ID 66)
233.645 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: "" + multiplayer.script-event-mismatch + "
" + "
233.646 Info ClientMultiplayerManager.cpp:539: MapTick(881) changing state from(ConnectedLoadingMap) to(Failed)