Thread: Menu getFunc
View Single Post
01/29/17, 01:55 AM   #3
Hoft
 
Hoft's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 17
Originally Posted by votan View Post
version is nil?
should be a number, e.g. 1.
Right! Just forgotted to place this variable in example.
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()
	local settings=Addon.Vars
	local options = {
		{	type	= "checkbox",
			name	= "Enables add-on",
			tooltip	= "",
			getFunc	= function() return settings.OnOff end,
			setFunc	= function(value) Addon.Vars.OnOff =value end,
			default	= Addon.Defaults.OnOff,
		},
end
But now ZO_SavedVars do not saves actual values!
  Reply With Quote