12x9 scenario

by DocJade

A 12x9 factorio world, as seen in "Can you beat Factorio on a 12x9 world?".

Scenarios
7 months ago
1.1
279
Environment

b 2.0.7 version

2 months ago

The level script caused a fatal error. Please report this bug to the script author.
Error while running event level::on_configuration_changed
level_/freeplay.lua:220: attempt to index global 'global' (a nil value) stack traceback:
level_/freeplay.lua:220: in function'on_configuration_changed'
core_/lualib/event_handler.lua:87: in function
<__core
_/lualib/event_handler.lua:84>

2 months ago
(updated 2 months ago)

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. ​

New response