Lua list append

lua list append — One can append an element to the end of an array with the function table.insert. — table.insert takes three arguments, the table, the position, and the value to insert. — By default the position is equal to the length of the table + 1, in other words it will append it […]

Lua list append Read More

Lua hash table length

lua hash table length — there is no way to achieve this other than to create your own function. — using #table (“#” is shorthand for table.getn(table)) won’t factor in key names. function table_length(t) local z = 0 for i,v in pairs(t) do z = z + 1 end return z end

Lua hash table length Read More