Getting User/Global vars into or out of plugins

BECOME PART OF THE COMMUNITY - Sign up here
  • For anyone wondering, I've found the way to get data into and out of LUA using the User and Global Variables like you could do on MA2.

    A word of warning, this is me digging around without documentation so take that for what it's worth, and MA is likely not supporting this yet so it could change.

    There are 5 functions (actually 7) in LUA that are used to get and set variables in the desk, they are:

    GlobalVars() returns varsObject with Global Variables

    UserVars() returns varsObject with User Variables

    SetVar(varsObject:vars, string:name, var:value) returns bool:Success

    DelVar(varsObject:vars, string:name) returns bool:Success

    GetVar(varsObject:vars, string:name) returns var:value

    So here is an example:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!