Im fix it
Change the on_configuration_changed function
(On line 220) in file Factorio\data\base\scenarios\12x9\freeplay.lua like this:
freeplay.on_configuration_changed = function()
global = global or {} -- Global table to initialize if it does not exist
global.created_items = global.created_items or created_items()
global.respawn_items = global.respawn_items or respawn_items()
global.crashed_ship_items = global.crashed_ship_items or Ship_items()
global.crashed_debris_items = global.crashed_debris_items or garbage_items()
global.crashed_ship_parts = global.crashed_ship_parts or Ship_parts()
if not global.init_ran, then
global.init_ran = #game.players > 0
end
end
This change should prevent the error, check for the presence of a global object, and create one if it is missing. Try updating the script in the game and restarting the world.