Menu getFunc
I have a problem with simple code ((
My menu allways show only default value! setFunc works right and changes variable ZO_SavedVars works right and load/saves variable When I change variable by menu, key bind, slash command, or any other way and returns to menu… it allways show default value! Where is my mistake? Code:
Addon = { |
version is nil?
should be a number, e.g. 1. |
Quote:
But version is assigned in my version of the add-on. Nearly solved: ZOS bug? getFunc can receive only local variables! Now it works: Code:
function Addon.Menu() |
Quote:
Addon is a global variable and "Addon_Settings" is not really a unique name. If you have to save Addon.Vars to a local variable, you have a global variable conflict. Somebody else is using Addon as a global variable. Make Addon local. |
Name «Addon» I used only in this exapmle
|
Please post the code with the names etc. that is not working and not some "placeholders".
It's easier to check it then. From what I can see so far there shouldn't be any problem with your code if you use a global "unique" addon name. There shouldn't be any reason to locally re-assign your global addon variables then just so the addon saves them. Do you have applied the "SavedVariables" name in your manifest txt file of the addon? It must be the same name that you use in your addon: Addon_Settings |
All times are GMT -6. The time now is 04:58 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI