Getting ready to upload one of my new addons. but i cant work out this error
Code:
Interface\AddOns\Wult\Wult.lua:116: attempt to call global 'CancelDuel' (a boolean value)
Count: 1
Call Stack:
(tail call): ?
[C]: in function `CancelDuel'
Interface\AddOns\Wult\Wult.lua:116: in function <Interface\AddOns\Wult\Wult.lua:114>
Code:
if CancelDuel then
addon:RegisterEvent("DUEL_REQUESTED")
addon:SetScript("OnEvent", function(self, event, challenger)
if (not IsControlKeyDown()) then
CancelDuel();
DEFAULT_CHAT_FRAME:AddMessage("Duel cancelled: "..challenger..". Press CTRL to allow the next request!",1,0.3,0.3);
DoEmote("no",1);
end
end)
end
any help would be great. thanks for your time