Message: ...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:87: Usage: UnitIsUnit("unit", "otherUnit")
JeeveStobs opened this issue ยท 12 comments
Lua error thrown each time a new round of Solo Shuffle (PvP) begins:
Message: ...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:87: Usage: UnitIsUnit("unit", "otherUnit")
Time: Thu May 18 09:16:59 2023
Count: 6
Stack: ...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:87: Usage: UnitIsUnit("unit", "otherUnit")
[string "=[C]"]: ?
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua"]:87: in function <...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:80>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua"]:119: in function <...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:118>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua"]:336: in function `SetStyle'
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:394: in function <...s_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:391>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:445: in function <...s_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:421>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:1572: in function `?'
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:1096: in function <...s_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:1095>
Locals: (*temporary) = nil
(*temporary) = "pet"
Can you check if the following version works or if it still results in Lua errors: https://drive.google.com/file/d/13yWIsQn2Vc8Zzo-2N3ganSxqWejqOPKH/view?usp=sharing
My guess right now is: It seems that (at least) in solo shuffles, the UNIT_FACTION event is fired in between the events NAME_PLATE_UNIT_REMOVE and NAME_PLATE_UNIT_ADDED. There is still a namplate returned for this unit (weirdly enough by the API), but it is not initialized for TP (which happens in NAME_PLATE_UNIT_ADDED). Not sure why it is like that.
It's not so much that a queue does not pop, I don't have the item level for solo shuffle. It's also restricted on the PTR (at least on the 10.1.5 PTR).
The actual error happens as the first argument of UnitIsUnit is nil in this case. As for why, I need to find out.
This might be because when each round begins, a hunter's pet is briefly flagged as hostile as the teams are shuffled.
Also to note I use TP to hide enemy pet nameplates, if that could be contributing to the error.
So I did another round of Solo Shuffle and was paired with a hunter each match. This triggered two Lua errors, same one as noted above and another:
Message: ...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:44: attempt to index field '?' (a nil value)
Time: Thu May 18 09:41:08 2023
Count: 1
Stack: ...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:44: attempt to index field '?' (a nil value)
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Elements/MouseoverHighlight.lua"]:44: in function <...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:36>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Elements/MouseoverHighlight.lua"]:121: in function <...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:121>
Locals: tp_frame = ThreatPlatesFrameNamePlate5 {
0 = <userdata>
CurrentAlpha = 1
Parent = NamePlate5 {
}
unitcache = <table> {
}
widgets = <table> {
}
style = <table> {
}
IsOccluded = false
UpdateMe = false
Active = true
visual = <table> {
}
unit = <table> {
}
}
unitid = nil
(*temporary) = nil
(*temporary) = Frame {
0 = <userdata>
HighlightTexture = Texture {
}
Highlight = Frame {
}
NameHighlight = Texture {
}
}
(*temporary) = <function> defined =[C]:-1
(*temporary) = "attempt to index field '?' (a nil value)"
UnitIsUnit = <function> defined =[C]:-1
Addon = <table> {
UIScaleChanged = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:1874
CheckForIncompatibleAddons = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Core.lua:315
Theme = <table> {
}
UseUniqueWidget = true
TotemCreatureType = "Totem"
UnitStyle_CastTrigger_Reset = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:324
UpdateExtensions = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Widgets/TidyPlatesExtensions.lua:90
AurasFilterMode = <table> {
}
IS_MAINLINE = true
UpdateConfigurationStatusText = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Functions/healthtext.lua:354
SetThemes = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Styles/init.lua:17
ANCHOR_POINT_SETPOINT = <table> {
}
CheckTableStructure = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Init.lua:342
CVars = <table> {
}
THREAT_VALUE_TYPE = <table> {
}
InitializeCustomNameplates = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Options.lua:395
ImportProfile = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Database.lua:1555
ProfChange = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Options.lua:10439
SpecName = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Core.lua:127
GetThreatStyle = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:178
SetStyle = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:335
OpenOptions = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Options.lua:10503
SetThreatColor = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Functions/threatcolor.lua:38
MigrateDatabase = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Database.lua:1337
CustomPlateGetHeaderName = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Options.lua:377
Font = <table> {
}
ForceUpdate = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:1955
UpdateStyleForStatusText = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Functions/healthtext.lua:342
UnitStyle_AuraTrigger_UpdateStyle = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:276
UpdateCustomStyleIcon = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Widgets/UniqueIconWidget.lua:189
LEGACY_CUSTOM_NAMEPLATES = <table> {
}
Animations = <table> {
}
UnitStyle_NameDependent = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:198
SplitByWhitespace = <function> defined @Interface/AddOns/TidyPlates_ThreatPlates/Init.lua:369
CurrentVersionIsOlderThan = <function> defined @Interface/AddOns/TidyPla
and
Message: ...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:87: Usage: UnitIsUnit("unit", "otherUnit")
Time: Thu May 18 09:45:53 2023
Count: 14
Stack: ...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:87: Usage: UnitIsUnit("unit", "otherUnit")
[string "=[C]"]: ?
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua"]:87: in function <...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:80>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua"]:119: in function <...ace/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua:118>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/Styles/Styles.lua"]:336: in function `SetStyle'
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:394: in function <...s_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:391>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:445: in function <...s_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:421>
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:1572: in function `?'
[string "@Interface/AddOns/TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua"]:1096: in function <...s_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:1095>
Locals: (*temporary) = nil
(*temporary) = "pet"
Definitely something to do with hunters and/or their pets.
Yeah, it triggers after a UNIT_FACTION event which is fired in between rounds, I think. It's just difficult to test for me as I cannot do solo shuffles :)
Ah yes! I was on my horde priest and it paired me with alliance hunters. I understand completely regarding the difficulty testing. Blizzard treats PvP as an afterthought and it's not like you can even test this on PTR as the Solo Shuffle queue will never pop.
Can you check if the following version works or if it still results in Lua errors: https://drive.google.com/file/d/13yWIsQn2Vc8Zzo-2N3ganSxqWejqOPKH/view?usp=sharing
My guess right now is: It seems that (at least) in solo shuffles, the UNIT_FACTION event is fired in between the events NAME_PLATE_UNIT_REMOVE and NAME_PLATE_UNIT_ADDED. There is still a namplate returned for this unit (weirdly enough by the API), but it is not initialized for TP (which happens in NAME_PLATE_UNIT_ADDED). Not sure why it is like that.
Thanks I will try this version and report back with my findings. Fingers crossed I get some alliance. ๐
It's not so much that a queue does not pop, I don't have the item level for solo shuffle. It's also restricted on the PTR (at least on the 10.1.5 PTR).
There is/was a vendor in Orgrimmar and Stormwind that gives max level PvP gear. Not sure on 10.1.5 PTR as I haven't logged since it was running 10.1 prior to going live.
Alright I got lucky and had an alliance hunter in a solo shuffle, with a pet, and no Lua error was thrown while using the beta version you provided above.