News for hackers. Stuff that matters.
Re:Lua Tutorial by sztanpet on Tuesday November 09, 2010 @03:39AM (#1885842)
The length operator(#) is a bit misleading when used with tables, you can only rely on it with array like tables with numeric indexes without holes in them (no nil values). Thats a big gotcha one should mention.
Re:Lua Tutorial by signa11 on Tuesday November 09, 2010 @04:13AM (#1885877)
yeah that is true. most of the time array would not have holes. when it does, using 'table.maxn(...)' works.