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.
- 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:
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
