lua-users home
lua-l archive

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


> 
> >From c++, how would I go about create a table (referenced, 
> let's say as
> 'table1'), and inserting a table into that table (referenced, 
> as 'table2').
> 
> I would like to be able to call 
> table1:table2:getFunctionValue(), and am not
> sure how to go about this.
> 
> I understand that to create a table I need something like:
> lua_newtable(L);
> lua_setglobal(L, "table1");
> lua_getglobal(L, "table1");
> lua_settable(L, -3);
> 
> Is that correct so far, and if so, how do I add the second table?


Try lua2c:
http://lua-users.org/lists/lua-l/2002-07/msg00000.html