Strixen / TMBTooltips

Tooltip addon for ThatsMyBis.com website
5 stars 5 forks source link

[WoTLKC] Error with DK's wish/prio list #4

Open NayooZ opened 2 years ago

NayooZ commented 2 years ago
  1. Add an item to a DK's wishlist or prio list
  2. Export TMB Tooltips > Save CSV data in game
  3. Mouseover an item with only a DK and no other classes having it on wish/prio > error generated
  4. Mouseover an item with DK and other classes having it on wish/prio list > no error but DK is not shown
3x TMBHelper\core.lua:592: attempt to concatenate field '?' (a nil value)
[string "@TMBHelper\core.lua"]:592: in function <TMBHelper\core.lua:470>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `SetItemByID'
[string "@AtlasLootClassic\Button\Item_type.lua"]:218: in function `OnEnter'
[string "@AtlasLootClassic\Button\Button.lua"]:119: in function <AtlasLootClassic\Button\Button.lua:112>

Locals:
tt = GameTooltip {
 0 = <userdata>
 ttNumLines = 0
 OnBackdropLoaded = <function> defined @SharedXML\Backdrop.lua:152
 GetBackdropColor = <function> defined @SharedXML\Backdrop.lua:390
 SetHyperlink = <function> defined =[C]:-1
 SetUnit = <function> defined =[C]:-1
 RightEdge = <unnamed> {
 }
 ttSetBackdropBorderColorLocked = true
 ClearBackdrop = <function> defined @SharedXML\Backdrop.lua:282
 SetPetAction = <function> defined =[C]:-1
 SetLootItem = <function> defined =[C]:-1
 ttDefaultAnchored = false
 FadeOut = <function> defined @TipTac\ttCore.lua:1435
 SetBuybackItem = <function> defined =[C]:-1
 SetMerchantItem = <function> defined =[C]:-1
 SetupTextureCoordinates = <function> defined @SharedXML\Backdrop.lua:214
 HasBackdropInfo = <function> defined @SharedXML\Backdrop.lua:278
 ttLastUpdate = 0
 ttIcon = <unnamed> {
 }
 GetEdgeSize = <function> defined @SharedXML\Backdrop.lua:188
 updateTooltip = 0.110000
 SetInventoryItem = <function> defined =[C]:-1
 TopEdge = <unnamed> {
 }
 ttCount = <unnamed> {
 }
 TooltipBackdropOnLoad = <function> defined @SharedXML\SharedTooltipTemplates.lua:172
 SetBagItem = <function> defined =[C]:-1
 SetAction = <function> defined =[C]:-1
 SetBackdropColor = <function> defined @TipTac\ttCore.lua:1638
 LeftEdge = <unnamed> {
 }
 SetAuctionItem = <function> defined =[C]:-1
 ttSetIconTextureAndText = <function> defined @TipTacItemRef\ttItemRef.lua:171
 SetSpellBookItem = <function> defined =[C]:-1
 canAddRestStateLine = 1
 SetCurrencyToken = <function> defined =[C]:-1
 SetGuildBankItem = <function> defined =[C]:-1
 SetBackdropBorderColor = <function> defined @TipTac\ttCore.lua:1646
 ttAnchorType = "mouse"
 ttDisplayingUnit = false
 SetCraftItem = <function> defined =[C]:-1
 comparing = false
 ttDisplayingAura = false
 ApplyBackdrop = <function> defined @TipTac\ttCore.lua:1622
 SetBackdrop = <function> defined @TipTac\ttCore.lua:1630
 TopOverlay = <unnamed> {
 }
 GetBackdropBorderColor = <function> defined @SharedXML\Backdrop.lua:409
 GetBackdrop = <function> defined @SharedXML\Backdrop.lua:347
 SetUnitDebuff = <function> defined =[C]:-1
 SetItemByID = <function> defined =[C]:-1
 Center = <unnamed> {
 }
 SetQuestItem = <function> defined =[C]:-1
 __tamedCounts = false
 SetBorderBlendMode = <function> defined @SharedXML\Backdrop.lua:266
 ttBackdropBorderColorApplied = false
 ttBackdropColorApplied = false
 SetTradeTargetItem = <function> defined =[C]:-1
 SetCurrencyTokenByID = <function> defined =[C]:-1
 SetInboxItem = <function> defined =[C]:-1
 shoppingTooltips = <table> {
 }
 BottomEdge = <unnamed> {
 }
 BottomLeftCorner = <unnamed> {
 }
 SetQuestLogItem = <function> defined =[C]:-1
 OnBackdropSizeChanged = <function> defined @SharedXML\Backdrop.lua:182
 SetUnitBuff = <function> defined =[C]:-1
 BottomOverlay = <unnamed> {
 }
 SetTradePlayerItem = <function> defined =[C]:-1
 BottomRightCorner = <unnamed> {
 }
 SetSendMailItem = <function> defined =[C]:-1
 ttSetBackdropLocked = true
 TopRightCorner = <unnamed> {
 }
 TopLeftCorner = <unnamed> {
 }
 backdropInfo = <table> {
 }
 SetTradeSkillItem = <function> defined =[C]:-1
 NineSlice = <unnamed> {
 }
 SetUnitAura = <function> defined =[C]:-1
 ttGradient = <unnamed> {
 }
 SetQuestCurrency = <function> defined =[C]:-1
 ttSetBackdropColorLocked = true
 needsReset = true
 SetupPieceVisuals = <function> defined @SharedXML\Backdrop.lua:246
 ttAnchorPoint = "BOTTOMLEFT"
 SetQuestLogCurrency = <function> defined =[C]:-1
 SetLootRollItem = <function> defined =[C]:-1
}
itemName = "Grim Toll"
itemLink = "|cffa335ee|Hitem:40256::::::::3:::::::::|h[Grim Toll]|h|r"
itemID = 40256
itemNotes = <table> {
 wishlist = <table> {
 }
 prioNote = ""
 rank = "S"
}
itemWishes = <table> {
}
wishlistString = ""
smallestKey = 1
smallestWish = <table> {
 character_is_alt = 0
 sort_order = 1
 character_name = "Faythene"
 is_offspec = 0
}
keyIndex = 2
t
huebersm commented 1 year ago

Had same Problem and brought in a workaround. Problem is, your DK did not select "Deathknight" as the class probably, so its empty/nil.

at around line ~588 i added this (you could also add custom color like some grey if there is no class). By time i might give a merge request

local altStatus = ""
                    local linebreaker = " "
                    local noteHolder = ""
                    local OSText = ""
                    local character_class = 11 --just declare as some default, so it shows atleast SOMEthing instead of NOTHing
                    if ItemListsDB.showMemberNotes then 
                        if smallestWish.character_note ~= nil then 
                            noteHolder = " {"..smallestWish.character_note.."} "
                        end
                    end
                    if i % 5 == 0 then linebreaker = "\n" end
                    if ItemListsDB.displayAlts and smallestWish.character_is_alt == 1 then altStatus = altColor end
                    if ItemListsDB.displayOS and smallestWish.is_offspec == 1 then OSText = "-OS" end
                    if smallestWish.character_class ~= nil then character_class = smallestWish.character_class end
                    wishlistString = wishlistString .. classColorsTable[ character_class ] .. smallestWish.character_name .. altStatus .. "[" .. smallestWish.sort_order .. OSText .. "]\124r" .. noteHolder .. linebreaker
                end