• Advertisement

Archived

This topic is now archived and is closed to further replies.

Need help with lua tables

This topic is 5410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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[i] = table1[i];
}
 
I added the if clause because i wanna copy all table members except the functions. I hope its not too unclear what i mean Thanks alot Mfg Impz0r

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites

  • Advertisement