This seems to be a common error since 8.2 and unfortunately Zork has been away so I'm not sure if the addons will be updated. I'm a bit of a novice still when it comes to lua but from what I've read, adding ClearAllPoints() prior to any SetPoint lines may fix the issue. Well in this case the error below is still popping. Any help would be appreciated.
The error specifically references the debuff button but I'm not entirely sure if that's where the offending code is. Posted below just in case.
Code:
FrameXML\BuffFrame.lua:354: Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: DebuffButton1:SetPoint.
[C]: in function `SetPoint'
FrameXML\BuffFrame.lua:354: in function <FrameXML\BuffFrame.lua:338>
[C]: ?
[C]: in function `DebuffButton_UpdateAnchors'
FrameXML\BuffFrame.lua:152: in function `AuraButton_Update'
FrameXML\BuffFrame.lua:100: in function `BuffFrame_Update'
FrameXML\BuffFrame.lua:50: in function <FrameXML\BuffFrame.lua:46>
Locals:
(*temporary) = DebuffButton1 {
0 = <userdata>
timeMod = 1
symbol = <unnamed> {
}
parent = BuffFrame {
}
duration = DebuffButton1Duration {
}
expirationTime = 998515.116000
unit = "player"
__normalTextureFile = "interface\addons\rButtonTemplate_Lyn\media\border"
count = DebuffButton1Count {
}
filter = "HARMFUL"
__styled = true
offsetY = 60
timeLeft = 241.652000
SetNormalTexture = <function> defined =[C]:-1
}
(*temporary) = "TOPRIGHT"
(*temporary) = BuffFrame {
0 = <userdata>
numEnchants = 0
BuffFrameFlashState = 1
BuffFrameFlashTime = 0.258998
BuffFrameUpdateTime = 0.007992
BuffAlphaValue = 0.758269
bottomEdgeExtent = 13
}
(*temporary) = "BOTTOMRIGHT"
(*temporary) = 0
(*temporary) = -60
And the debuff button section of rBuffFrame
Code:
function rBuffFrame:CreateDebuffFrame(addonName,cfg)
cfg.frameName = addonName.."DebuffFrame"
cfg.frameParent = cfg.frameParent or UIParent
cfg.frameTemplate = nil
--create new parent frame for buttons
local frame = CreateFrame("Frame", cfg.frameName, cfg.frameParent, cfg.frameTemplate)
--Added fix for 8.2
frame:ClearAllPoints()
frame:SetPoint(unpack(cfg.framePoint))
frame:SetScale(cfg.frameScale)
local function UpdateAllDebuffAnchors(buttonName, index)
--add all other debuff buttons
local buttonList = GetButtonList("DebuffButton",DEBUFF_MAX_DISPLAY)
--adjust frame by button list
SetupButtonFrame(frame, cfg.framePadding, buttonList, cfg.buttonWidth, cfg.buttonHeight, cfg.buttonMargin, cfg.numCols, cfg.startPoint)
end
hooksecurefunc("DebuffButton_UpdateAnchors", UpdateAllDebuffAnchors)
--add drag functions
local relativeToName, _, relativeTo = nil, unpack(cfg.framePoint)
if type(relativeTo) == "table" then
relativeToName = relativeTo:GetName()
elseif type(relativeTo) == "string" and _G[relativeTo] then
relativeToName = relativeTo
end
if relativeToName ~= addonName.."BuffFrame" then
rLib:CreateDragFrame(frame, L.dragFrames, -2, true)
end
return frame
end