[Z] Adventure


As you expand your base or simply explore the surface of Nauvis, you will find abandoned constructions left behind by someone else, among those will be storages with useful resources, deserted production lines, as well as whole complexes for mass production of various parts.

5 years ago
0.16 - 0.17
20

b attempt to index field 'character' (a nil value)

5 years ago
(updated 5 years ago)

Hi all,

I encounter a strange bug with the mod (mod version : 2.17.2, game version : 0.17.41), when a player disconnect (in multi), this message appear always (5-7 each sec):
"
Script @ZAdventure/control.lua:42: [[ZADV]]
ZADV_Base-free recipe.on_event[0] error:
ZAdventure/areas.lua:1150: attempt to index field 'character' (a nil value)
"

Sound like the connected character are not check before doing other stuff, but i don't kknow how to fix. All my try provoke desync bug.

thanks in advance.

5 years ago

This error really need a fix ... You save all error message in global ... That cause a expendable infinite global and each launch need reload ALL and take an amazing time to reload ...
-> https://forums.factorio.com/viewtopic.php?f=23&t=71064&p=431381#p431381
Thanks.

5 years ago

Yeah this is happening repeatedly on a server now...

5 years ago
(updated 5 years ago)

I added the bottom pieces to my init function after looking through some of the discussions (author seems gone)

Don't know if it works or not, but it looks like the author stores data there, so I just empty the table. It's in control.lua, search for "local function Init()"

There's an ".Events", which I might need to clear because an inventive station dialog is stuck

local function Init()

-- global variables
global.ZADV = global.ZADV or {}
global.ZADV.Events = global.ZADV.Events or {}
global.ZADV.errors = global.ZADV.errors or {}
global.ZADV.InProcess = false
global.ZADV.ForceUnlock = false
global.ZADV.NextForceUnlock = 0 
global.ZADV.EventLock = 0
global.ZADV.debug = 0


global.ZADV.debug = {}
global.ZADV.errors = {}
5 years ago
(updated 5 years ago)

P.s. this function triggers when the map/save is loaded, so if you keep a server running for too long, it'll "leak" memory until you reload the map. I was going to find a way to add a command to do it, but this works well enough for me now so I thought I'd share it.

New response