View Full Version : Lua question
esajesa
September 27th, 2005, 08:21 AM
Hi,
is it possible (and if so how) in NR lua to directly use variables without going through the old NetRemote.GetVariable([variable]) function, eg:
if ZP.PlayState == "Play" then.....
instead of
if (NetRemote.GetVariable("ZP.PlayState") == "Play") then....
Cheers,
Jens
Promixis
September 27th, 2005, 08:41 AM
Jens,
I am not sure Ben has done this?
If not, it would be easy to modify the metatable of _G to automatically lookup variables that already did not exist in the global name space of lua.
Ben thoughts?
danward79
September 27th, 2005, 10:45 AM
I think this is in Ben's plan for the future.
esajesa
September 27th, 2005, 11:17 AM
Yeah, I hope this will be implemented, makes for much less code as well as it should run quicker due to less function calls..
Ben S
September 27th, 2005, 09:14 PM
This is on the list for a future version, but not sure (definitely not the next release(s), but soon after, perhaps).
Promixis
September 27th, 2005, 09:17 PM
This is on the list for a future version, but not sure (definitely not the next release(s), but soon after, perhaps).
Ben, why not implement this as i mentioned above?
Ben S
September 27th, 2005, 09:20 PM
A user can do that (the metatable of _G), but I'd like to make the integration tighter, or take a deeper look to see how this would impact performance, etc. given that NetRemote only knows about strings, not about other things (like tables, etc) before rolling this into "NetRemote proper".
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.