Critico
Sexy
- Joined
- Mar 25, 2010
- Messages
- 370
- Reaction score
- 176
I need to return the total table
total: 3 ^
but if use '#tabble' returns 0
one way is as follows:
does anyone know another way?
Lua:
tabble = {
["minotaur"] = {exp = 1000},
["globin"] = {exp = 2000},
["rotworm"] = {exp = 4000}
}
total: 3 ^
but if use '#tabble' returns 0
one way is as follows:
Lua:
tabble = {
["minotaur"] = {exp = 1000},
["globin"] = {exp = 2000},
["rotworm"] = {exp = 4000}
}
local x = {}
for var, ret in pairs(tabble) do
table.insert(x, var)
end
print(#x) -- return 3
does anyone know another way?