I am kinda a lua nuub but, I want to do something like this:
number=1
If something~= nothing then
number=number+1
tbl=(tbl..number) (Basically, I want to make this be called tbl2 and the next table be calloed tbl3 and so on.)
tbl={
["a"]=ab,
["b"]=bc,
...
So, I want to know if that is possible to have a variable put into a table name to make the table unique for each if, then function.
Thanks.
Last edited by freight86 : 07-12-10 at 11:12 PM.
Reason: added more notes
local myTables = {}
local i = 0
if something then
i = i + 1
myTables[i] = {
["a"] = ab,
["b"] = bc,
}
end
-- You can then access the table via
myTables[1] and so on