Advertisement

Need help with lua tables

Started by March 29, 2003 05:43 PM
0 comments, last by Impz0r 21 years, 7 months ago
Hi, I was wondering if there any possibility in copy a lua table to another one in c++?! I mean something like this (pseudo code):

table1 = get_from_lua(name1);
table2 = get_from_lua(name2);
tablesize = get_table_size_lua(table1);
for (i;i<tablesize;i++)
{
 if (table1 != lua_function)
  table2 = table1;
}
 </pre> 

I added the if clause because i wanna copy all table members except the functions. I hope its not too unclear what i mean <img src="smile.gif" width=15 height=15 align=middle>

Thanks alot

Mfg Impz0r  </i>   
Stay Evil & Ugly!
I think the LUA documentation has some info on using LUA's table's in C++:

http://www.lua.org/manual/manual.html#5.10

[edit: hmph, how do I turn that into a link?]

[edited by - blueEbola on March 29, 2003 6:57:24 PM]

This topic is closed to new replies.

Advertisement