FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to access variables from Lua?

2 posters

Go down

How to access variables from Lua? Empty How to access variables from Lua?

Post  oioioi 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

Back to top Go down

How to access variables from Lua? Empty Re: How to access variables from Lua?

Post  sio2interactive 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,
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

How to access variables from Lua? Empty Re: How to access variables from Lua?

Post  oioioi Sat Jan 17, 2009 4:56 pm

Thanks I will try that tomorrow

oioioi

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

Back to top Go down

How to access variables from Lua? Empty Re: How to access variables from Lua?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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