Try using generic for loops
they follow this format (assuming the name of the table is exampleTable
Code:
for k,v in pairs(exampleTable) do
print(i)
print(v)
end
A table contains several pieces of information (values) in what is known as keys. These are called key value pairs. The k and v in the generic for loop are variables (like in the more familiar numeric for loop) and the loop iterates though every key value pair, printing the name of the key, followed by the contents of the value.
Values can be any type of Lua variable. If it is a string, boolean or number it will print it out straightforwardly. If it is a function or a table you will get something like function:324r2034709 or table:98209344. This is not a bug or a problem. You can have nested generic for loops inside existing generic for loops to work through the nested tables until you have produced something that is human readable (or at least understandable) e.g.
Code:
for k,v in pairs(exampleTable) do
if type(v) == "table" then
for l,w in pairs(v) do
--random code
end
else
print(v)
end
end
You can nest the loops as many times as is necessary just change the names of the k and v bit each time.
For more information look here
http://lua-users.org/wiki/TablesTutorial
If you still have problems then you will have to show your code. Everything you need to work through the tables can probably be found in that link but if there are any other problems we might be able to spot them in your code. Try using the generic for loop stuff first though.