API:ModuleRemoveSavedVariable
From RoR Wiki
UI Lua API · Module functions
Version: WAR 1.4.8
Removes a saved variable from a UI module at run time.
ModuleRemoveSavedVariable(moduleName, variableName)
Arguments
- moduleName
string– The module's name, as in thenamefield of ModulesGetData.- variableName
string– Name of the saved variable, exactly as it was registered.
Returns
Nothing.
Details
- If the module has no saved variable with that name, the does not have a saved variable error is logged.
- As with ModuleAddSavedVariable, the change is accepted only while the module is initialized or being initialized. Otherwise the is not loaded error is logged; its wording does not match the check.
- The function needs at least two arguments and only reads the last two.
- The stock UI never calls
ModuleRemoveSavedVariable.
Errors
These are written to the UI log; the call returns normally.
Error in function call 'ModuleRemoveSavedVariable': %s is not a valid UiMod name.Error in function call 'ModuleRemoveSavedVariable': %s is not loaded. You may not modify the SavedVariables on a Module that is initialized.Error in function call 'ModuleRemoveSavedVariable': %s does not have a saved variable named '%s'.
Example
A minimal example built from the signature above:
ModuleRemoveSavedVariable( "MyAddon", "MyAddon.Settings" )
