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

SetVar(object: variables, string:varName, var:value) : bool

Paramiters:

Name Description Optional
object:variables A referance to Variables Object. e.g. GlobalVars(), PluginVars(), AddonVars(), UserVars()
string:varName Variable name to set
var:value The resulting value (number, string, ...)

Returns:

string: "Ok" string: "Syntax Error" string: "Ilegal Command" ...

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