How to access variables from Lua?

View previous topic View next topic Go down

How to access variables from Lua?

Post  oioioi on Sat Jan 17, 2009 12:56 pm

After looking on the Lua tutorial I can see that you can access variables from other C files from inside Lua, but the tutorial only shows how to access variables inside the SIO2 struct, how to I access a variable made inside template.mm?

Thanks!

oioioi

Posts : 136
Join date : 2008-12-02
Location : Norway

View user profile

Back to top Go down

Re: How to access variables from Lua?

Post  sio2interactive on Sat Jan 17, 2009 4:44 pm

I think you maybe misunderstood the scripting concept... In a nutshell...

1. You write some API (like SIO2)
2. You make a wrapper to expose all the API to LUA by creating a module
3. Within LUA you call the variables within the module.

If you want variables to be accessible from LUA you need to add them inside the wrapper and regenerate it.

Cheers,
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: How to access variables from Lua?

Post  oioioi on Sat Jan 17, 2009 4:56 pm

Thanks I will try that tomorrow

oioioi

Posts : 136
Join date : 2008-12-02
Location : Norway

View user profile

Back to top Go down

Re: How to access variables from Lua?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum