Sign in to follow this  
h3ro

Passing a struct as a table to LUA function

Recommended Posts

Hallo, Does anyone know how to pass a struct from c/c++ to a lua script as an argument for a function? I know how to pass a single number, but I am unsure about how to pass a table (I asume that is what I need to pass)? I have been googleing and reading for a while now and could really need a pointer in the right direction. Regards,

Share this post


Link to post
Share on other sites
Keep in mind that, since C++ lacks reflection, you'll have to explicitely specify every single member that should go into the table.
A nice template function and/or macro might help with it, though [smile]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this