diff --git a/plugins/player_sync/module/player_sync.lua b/plugins/player_sync/module/player_sync.lua index 28346ffe..473b6e5e 100644 --- a/plugins/player_sync/module/player_sync.lua +++ b/plugins/player_sync/module/player_sync.lua @@ -379,7 +379,8 @@ end -- Upload inventory when a player leaves the game. Triggers on restart after crash if player was online during crash. player_sync.events[defines.events.on_pre_player_left_game] = function(event) -- for some reason, on_pre_player_left_game gets called before on_server_startup so script_data isn't ready yet - if not compat.script_data.player_sync then + -- migrate: saves from before the rename still have their data under inventory_sync + if not compat.script_data.player_sync and not compat.script_data.inventory_sync then log("ERROR: script data for player sync is not defined") return end