I just noticed that my variables that are stored in the glob-table are cleared after quitting a game. So probably I made something wrong.
Here is my code of the onLoad-event:
Code: Select all
game.onload(function()
if glob.treefarm == nil then
glob.treefarm = {}
glob.treefarm.field = {}
glob.treefarm.fieldcounter = 0
glob.treefarm.tick = 0
end
end)
What I found out so far:
If I save a game and resume to it, everything is still fine, but if I close factorio or return to main-menu and load a savegame the tables are empty.
EDIT:
I just noticed that this behaviour just appears in savegames from one specific game, so now I am very confused...