Code: Select all
Error while running event level::on_tick (ID 0)
...Data/Roaming/Factorio/temp/currently-playing/control.lua:958: attempt to index upvalue '_ENV' (a nil value)
stack traceback:
...Data/Roaming/Factorio/temp/currently-playing/control.lua:958: in function 'func'
...Data/Roaming/Factorio/temp/currently-playing/control.lua:617: in function <...Data/Roaming/Factorio/temp/currently-playing/control.lua:575>
Code: Select all
line957: table.insert(global.on_tick[game.tick + 18000], function ()
line958: global.buildings[force].radars[i] = game.surfaces[1].create_entity{name = "dota-radar", position = pos, force = force}
maybe because it forgets the local variables that were attached to the function?