|
jthomas Newbie
Joined: 23 Oct 2016 Posts: 5
|
Posted: Thu Jun 14, 2018 1:33 am
Using lua to access variables by class |
I have two classes, ClassOne and ClassTwo, both contain variables with the same name, thisvariable.
Using lua, how do I use the zs.var to access a specific variable?
zs.var.thisvariable only gives me the last variable created (highest ID i'm assuming)
i see zs.makevar lets me specify a class to create in, how do i reverse that for finding a variable in a specific class? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Thu Jun 14, 2018 1:33 pm |
Supposedly the getvar function can do this, but even specifying the class data is not pulling the variable from the specified class, still only hitting the one last created.
#LUA {a=zs.getvar("thisvariable", "ClassOne");print(a.value)}
As such, this may not be currently possible with Lua. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|