__level__/freeplay.lua:197: attempt to index global 'global' (a nil value)

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
kpgg
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 28, 2024 2:56 am
Contact:

__level__/freeplay.lua:197: attempt to index global 'global' (a nil value)

Post by kpgg »

When attempting to load a years-long save file without mods after the space age update, I encountered this error when loading and fixing

Code: Select all

The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_configuration_changed
__level__/freeplay.lua:197: attempt to index global 'global' (a nil value)
stack traceback:
    __level__/freeplay.lua:197: in function 'on_configuration_changed'
    __core__/lualib/event_handler.lua:87: in function <__core__/lualib/event_handler.lua:84>
How do I fix it?
Last edited by kpgg on Mon Oct 28, 2024 6:15 am, edited 1 time in total.
kpgg
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 28, 2024 2:56 am
Contact:

Re: __level__/freeplay.lua:197: attempt to index global 'global' (a nil value)

Post by kpgg »

If you have steam cloud enabled, disable it first.
Then, navigate to your save file location
  • On windows, it's "%appdata%\factorio\saves"
  • On linux, it's (probably) "~/.factorio/saves"
Then, find your world save, it's name should be "<name-of-your-world>.zip".
Unzip it with a new folder name and find the "freeplay.lua" file.
Find and replace all occurences of "global" with "storage" with a text editor.

Then, navigate to your freeplay scenario folder
  • On windows, it's "%appdata%\factorio\scenarios\freeplay"
  • On linux, it's (probably) "~/.factorio/scenarios/freeplay"
Find the "freeplay.lua" file.
Find and replace all occurences of "global" with "storage" with a text editor.

This should fix the problem.
Gummiente27
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jul 16, 2018 2:59 am
Contact:

Re: __level__/freeplay.lua:197: attempt to index global 'global' (a nil value)

Post by Gummiente27 »

For me, the scenario folder can only be found inside the game install dir, not in the appdata folder, and its freeplay.lua has no "global" inside
Post Reply

Return to “Technical Help”