Page 1 of 1

What's the cause of this error?

Posted: Sat Feb 11, 2017 2:29 am
by Sirenfal

Code: Select all

Error while running deserialisation: [string "do local _={allocator={size_index={[0x2.70000..."]:1: too many local variables (limit is 200) in main function near '='
script.dat is 122kb and there's nothing obviously obscene or broken inside it. I have several nested tables (composited classes with metatables restored at runtime).

EDIT: There's a lot of this stuff... 241 > 200 of them. Is this just restoring entity references?

Code: Select all

local table1={magic="802384732948701238470123",type=0x0p+0,entitytarget=0x1.dp+4}
_.factories["1"].restore[table1]={[0x1p+0]=true,[0x2p+0]=true,[0x3p+0]=true,[0x4p+0]=false}

Re: What's the cause of this error?

Posted: Sat Feb 11, 2017 2:56 am
by Rseding91
You're using tables as keys in other tables. Don't do that.

Re: What's the cause of this error?

Posted: Sat Feb 11, 2017 6:04 am
by Sirenfal
I suggest you add that to the Lua global API page