Table Addon

From SolarStrike wiki
Revision as of 23:18, 14 June 2014 by Elverion (talk | contribs) (Protected "Table Addon" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Jump to: navigation, search

copy()

table table.copy(table tab)

Actually does a full copy of a table, instead of referencing the original. This also recursively copies sub-tables.


find()

table table.find(table haystack, number|string needle)

Checks table 'haystack' for anything that matches 'needle'. If found, returns the table's key that contains the value. If no match is found, returns nil.


print()

table.print(table tab[, number depth])

Recursively dump the table to the standard output. This is useful for debugging. When called from Lua, you probably shouldn't include the depth...