Lua error in raid
NLZ opened this issue ยท 8 comments
I got this lua error in raid, not sure why.
What additional information should I provide?
2x Kui_Nameplates_Core\create.lua:1581: Usage: UnitCanAttack("unit", "otherUnit")
[C]: ?
Kui_Nameplates_Core\create.lua:1581: in function `NameOnlyUpdate'
Kui_Nameplates_Core\hook.lua:141: in function `func'
Kui_Nameplates\messages.lua:33: in function `DispatchMessage'
Kui_Nameplates\elements/target.lua:9: in function <Kui_Nameplates\elements/target.lua:7>
Kui_Nameplates\elements/target.lua:32: in function `func'
Kui_Nameplates\messages.lua:81: in function <Kui_Nameplates\messages.lua:44>
[C]: in function `TargetUnit'
FrameXML\SecureTemplates.lua:483: in function `handler'
FrameXML\SecureTemplates.lua:619: in function `SecureActionButton_OnClick'
FrameXML\SecureTemplates.lua:659: in function <FrameXML\SecureTemplates.lua:651>
Locals:
(*temporary) = "player"
(*temporary) = nil
What version are you using? (Go into /knp and look at the top right, it should say the version there)
And do you have name-only enabled on enemies?
Ah yes, sorry, its 2-14-5-beta-3-2-gc20c0de (the newest alpha from curse).
I dont remember it happening with the previous aplha. Should I roll back and test?
If you can reliably get make it happen with this version, then yes, but I haven't actually changed anything to do with that code, so I don't know why that would be.
Maybe I'm wrong and it just hadnt happened before. Or could it be an interference from other mod?
I'll keep an eye on it to see if I can pinpoint when it happens. Can you give any suggestion on what should I look for?
It happened when you changed target to some nameplate which didn't have a unit assigned to it by the time the PLAYER_TARGET_CHANGED event was fired. Which is either an extremely rare race condition (i.e. it went off screen or otherwise disappeared in the same frame that the event was fired), or just some oddity with that particular target.
Do you know which boss/target it was by any chance?
Let me know if you see this again on the current release (2.14.5 - or any version past the above commit)