Hey, can anyone please help me? I can't play with this error, and it took me forever to setup discord bars.
I tried adding an condition to an action, and I had no idea what I was doing so it wasn't a good action. I deleted the action. Next time I start up I get this:
Interface\Addons\DiscordLibrary\DiscordLib_Main.lua:345: Usage: GetActionCooldown(slot)
|
So basically, discord is calling the GetActionCooldown function without passing a real number. It's not passing the action numbers for some reason.
The function it's in:
Code:
function DL_CooldownLeft(action)
local start, duration, enable = GetActionCooldown(action);
if (start and duration and enable) then
local remaining = duration - (GetTime() - start);
if (remaining > 0) then
return remaining;
else
return 0;
end
else
return 0;
end
end
When I replace GetActionCooldown(action); with say.. 1, it doesn't give an error. However, it give's an error from where this is called from, because a bad action number is passed there and then passed here. So this is where it starts:
Code:
function DL_ActionUsable(action)
local cd = DL_CooldownLeft(action);
if (cd > 0) then return; end
local isUsable, notEnoughMana = IsUsableAction(action);
if (not isUsable) then return; end
if (notEnoughMana) then return; end
local range = IsActionInRange(action);
if (range ~= 0) then return true; end
end
It'll give an error for IsUsableAction(action) and DL_CooldownLeft(action) and IsActionInRange(action) of course, because the variable "action" isn't correct.