First you should remove the exampleoptions.lua and the LibAddonMenu-2.0.txt from the libs folder.
No need for them as the library is called from the manifest txt of the addon.
Then:
In line 218 there is a variable "buttoN" which isn#t declared anywhere so it is nil and throws this error:
Lua Code:
if profileValue ~= boolValue then
checkboxControl:GetHandler("OnClicked")(checkboxControl, button)
end
Try to change it to something like this and see if it works then:
Lua Code:
if profileValue ~= boolValue then
checkboxControl:GetHandler("OnClicked")(checkboxControl)
end
Or try this:
Lua Code:
if profileValue ~= boolValue then
local cbOnClickedHandler = checkboxControl:GetHandler("OnClicked")
cbOnClickedHandler(checkboxControl)
end