AddonVars(string)
Description
Section titled “Description”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. |
Arguments
Section titled “Arguments”- String:
The string needs to be the name of the addon.
Return
Section titled “Return”- Handle:
The function returns a handle of the set of variables.
Example
Section titled “Example”This example prints information connected to the “Demo” addon variable set. It uses the Dump() function:
Dump()
Section titled “Dump()”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 messageif variableSet == nil then ErrPrintf("The variable set does not exists") returnendPrintf("=============== START OF DUMP ===============")variableSet:Dump()Printf("================ END OF DUMP ================")end
