Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Need help with lua tables


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Impz0r   Members   -  Reputation: 166

Like
Likes
Like

Posted 29 March 2003 - 11:43 AM

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


Sponsor:

#2 blueEbola   Members   -  Reputation: 464

Like
Likes
Like

Posted 29 March 2003 - 11:56 AM

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]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS