lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Dang, these table things are confusing me. I get how to pass a single table back to lua. How do I pass a table structure back that has nested tables in it? So for example, I call a C method from Lua script which has a table type as a return value that looks something like (and could have multiple nested tables etc. But I'm guessing once I understand how to do one nested, it becomes a repeat):

{ {name="Scooby",age=45, type="Dog",someusertype=<userdata>},{name="Shaggy",age=24, type="Human",someusertype=<userdata>}}

(Obviously the example setup is built from some values in C and so on);

Thanks for the help!