Originally Posted by sirinsidiator
LAM simply calls your setFunc and passes the default value from the data table to it. Maybe you can add a log output to your setFunc to check if it is really not calling it?
|
I found out it might be caused by my enable option, which asks for a setFunc value but never use it. After I removed it from the options the registerForDefaults works well! Thanks for your inspiration
Code:
...
[1] = {
type = "checkbox",
name = GetString(MSAL_ENABLE_MSAL),
tooltip = GetString(MSAL_ENABLE_MSAL_TOOLTIP),
getFunc = function() return db.enabled end,
setFunc = function(value) self:ToggleAutoLoot() end,
default = true,
},
...