View Single Post
09-01-18, 01:25 PM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Assuming you set up your saved variable correctly in OnInitialize, in your enable table, change your get and set functions:
Lua Code:
  1. get = function()
  2.     return self.db.profile.enable
  3. end,
  4. set = function(info, value)
  5.     self.db.profile.enable = value
  6. end
And delete lines 20-22 because that isn't going to work.

Now to disable size based on enable:
Lua Code:
  1. get = function()
  2.     return self.db.profile.size
  3. end,
  4. set = function(info, value)
  5.     self.db.profile.size = value
  6. end,
  7. disabled = function()
  8.     return not self.db.profile.enable
  9. end

Last edited by myrroddin : 09-01-18 at 01:26 PM. Reason: minor typo
  Reply With Quote