[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: serialization nil values
- From: "Wim Couwenberg" <w.couwenberg@...>
- Date: Wed, 29 Jan 2003 16:27:25 +0100
Hi,
> >From the Lua documentation: "The number n of returned values is either
> the value of Table.n, if it is a number, or one less the index of the
> first absent (nil) value."
>
> Any tips and ideas to solve this problem are welcome.
Just use the "n" member, like in:
local a = {[1]="aap", [3]="noot", n=3}
local b, c, d = unpack(a)
print(tostring(b), tostring(c), tostring(d))
So insert a "Table.n = <number>" just before your unpack call.
Bye,
Wim