Baganator

Baganator

1M Downloads

Error on MouseOver on categories with static Items added

R41z0r opened this issue ยท 1 comments

commented

What version(s) of WoW are you using?

Retail

What version of Baganator?

489

What version of Syndicator?

123

What isn't working? What was supposed to happen?

When I am inside the Categories option and hover over items inside my categorie mostly when there are more than 4 items inside the list of items I get a lua error on hover over items with index > 3/4/5. Mostly for items with index number 4-7.
Items after 7 worked for me for now, but doesn't mean that it's working always, haven't tested it enough for that.
CleanShot 2024-09-19 at 16 55 05
The items in the picture would cause an error.

In the Code the section:
if GameTooltip:IsShown() and not items[i].invalid then GameTooltip:AddLine(GREEN_FONT_COLOR:WrapTextInColorCode(BAGANATOR_L_RIGHT_CLICK_TO_REMOVE)) GameTooltip:Show() elseif BattlePetTooltip:IsShown() then BattlePetTooltip:AddLine(GREEN_FONT_COLOR:WrapTextInColorCode(BAGANATOR_L_RIGHT_CLICK_TO_REMOVE)) BattlePetTooltip:Show() else items[i].invalid = true GameTooltip:SetOwner(itemButton, "ANCHOR_RIGHT") GameTooltip:AddLine(RED_FONT_COLOR:WrapTextInColorCode(BAGANATOR_L_ITEM_INFORMATION_MISSING)) GameTooltip:AddLine(GREEN_FONT_COLOR:WrapTextInColorCode(BAGANATOR_L_RIGHT_CLICK_TO_REMOVE)) GameTooltip:Show() end
is the bug, items[i] is sometimes nil so there is no "invalid" checked it with if items and not items[i] then print("bug") end

Are you experiencing any lua errors

42x ...dOns/Baganator/CustomiseDialog/Categories/Editor.lua:550: attempt to index field '?' (a nil value)
[string "@Baganator/CustomiseDialog/Categories/Editor.lua"]:550: in function <...dOns/Baganator/CustomiseDialog/Categories/Editor.lua:549>
[string "=[C]"]: in function `UpdateTooltip'
[string "@Baganator/ItemViewCommon/ItemButton.lua"]:455: in function <...rfaceBaganator/ItemViewCommon/ItemButton.lua:454>

Locals:
_ = Button {
IconOverlay = Texture {
}
IconBorder = Texture {
}
icon = BaganatorCustomiseDialogFrameIconTexture {
}
count = 1
HighlightTexture = Texture {
}
BGR =

{
}
PushedTexture = Texture {
}
Count = BaganatorCustomiseDialogFrameCount {
}
searchOverlay = BaganatorCustomiseDialogFrameSearchOverlay {
}
IconOverlay2 = Texture {
}
isCraftedItem = false
isProfessionItem = false
widgetContainer = Frame {
}
NormalTexture = BaganatorCustomiseDialogFrameNormalTexture {
}
ItemContextOverlay = Texture {
}
showMatchHighlight = true
cornerPlugins =
{
}
itemContextMatchResult = 3
Stock = BaganatorCustomiseDialogFrameStock {
}
SlotBackground = Texture {
}
}
(*temporary) = nil
(*temporary) = 3
(*temporary) = true
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field '?' (a nil value)"
items =
{
1 =
{
}
}
i = 3
itemButton = Button {
IconOverlay = Texture {
}
IconBorder = Texture {
}
icon = BaganatorCustomiseDialogFrameIconTexture {
}
count = 1
HighlightTexture = Texture {
}
BGR =
{
}
PushedTexture = Texture {
}
Count = BaganatorCustomiseDialogFrameCount {
}
searchOverlay = BaganatorCustomiseDialogFrameSearchOverlay {
}
IconOverlay2 = Texture {
}
isCraftedItem = false
isProfessionItem = false
widgetContainer = Frame {
}
NormalTexture = BaganatorCustomiseDialogFrameNormalTexture {
}
ItemContextOverlay = Texture {
}
showMatchHighlight = true
cornerPlugins =
{
}
itemContextMatchResult = 3
Stock = BaganatorCustomiseDialogFrameStock {
}
SlotBackground = Texture {
}
}

Anything else?

No response

commented

Thanks for the bug report. I've identified the problem and added a fix in the latest alpha (out soon) and will be in the next release.