Skip to content

AddonVars(string)

The AddonVars function returns a handle to the set of variables connected to a specific addon.

Restriction:
The addon variable set is not helpful at the moment.
  • String:
    The string needs to be the name of the addon.
  • Handle:
    The function returns a handle of the set of variables.

This example prints information connected to the “Demo” addon variable set. It uses the Dump() function:

The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.

Learn more in the Dump() topic.

Copy CodeLua
```
return function()
-- Stores the handle to a variable set connected to the addon named 'Demo'.
local variableSet = AddonVars("Demo")
-- Check if the return is nil and print an error message
if variableSet == nil then
ErrPrintf("The variable set does not exists")
return
end
Printf("=============== START OF DUMP ===============")
variableSet:Dump()
Printf("================ END OF DUMP ================")

end