lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I'm facing a weird situation, where 'table.getn({})' gives 2!
> [...]
>      if (n>0 and (not tbl[n])) then  -- BUG TRAPPING in Lua5.1w1 !!!

Are you sure you did not call 'table.setn' before?  Are you sure the
table does not have a '.n' field?  Otherwise, are you sure the table is
really empty? (I mean, in this last case this is actually a bug, but to
find the bug it would be useful to know what the table contains.)

-- Roberto