🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Need help with lua tables

Started by
0 comments, last by Impz0r 21 years, 3 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!
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]

This topic is closed to new replies.

Advertisement