Skip to content
Anthony Headley edited this page Apr 19, 2020 · 2 revisions

GetVar(object:variables, string:varName) : var

Paramiters:

Name Description Optional
object:varible A referance to Variables Object. e.g. GlobalVars(), PluginVars(), AddonVars(), UserVars()
string:name Variable name to retrive

Returns:

var: value (number, string, ...) nil: if no value

Examples:

local userVar = UserVars()
local setSuccess = SetVar(userVar, "COUNTER", 42)
local result = GetVar(userVar, "COUNTER") -- result = 42
local delSuccess = DelVar(userVar, "COUNTER") 
Clone this wiki locally