Jaliborc / Bagnon

Single window displays for you items
200 stars 112 forks source link

error after adding new bag #1998

Open qlesz opened 8 hours ago

qlesz commented 8 hours ago

I got this error after adding new bag. After error main bag stop opening and error keep poping up everytime i try to open bags. 11x BagBrother/core/classes/itemGroup.lua:112: attempt to compare number with boolean [string "@BagBrother/core/classes/itemGroup.lua"]:112: in function Layout' [string "@BagBrother/core/classes/itemGroup.lua"]:32: in function <BagBrother/core/classes/itemGroup.lua:30> [string "=[C]"]: in functionShow' [string "@BagBrother/core/api/frames.lua"]:32: in function `Show' [string "@BagBrother/core/api/frames.lua"]:24: in function <BagBrother/core/api/frames.lua:23>

[string "@BagBrother/core/features/autoDisplay.lua"]:83: in function ToggleBackpack' [string "@Blizzard_MainMenuBarBagButtons/Classic/MainMenuBarBagButtons.lua"]:54: in functionBackpackButton_OnClick'

Locals: self = Frame { buttons =

{ } order =
{ } frame = BagnonInventory1 { } bags =
{ } } profile =
{ rules =
{ } point = "BOTTOMRIGHT" hiddenBags =
{ } scale = 0.960000 borderColor =
{ } enabled = true reverseBags = true columns = 6 money = true alpha = 1 bagBreak = false x = -50.000076 lockedSlots =
{ } reverseSlots = false color =
{ } hiddenRules =
{ } y = 100 } columns = 6 scale = 1 size = 39 space = 1.300000 revBags = true revSlots = false x = 6 y = 0 group = 0 (for index) = 1 (for limit) = 1 (for step) = -1 k = 1 frame = Frame { id = 0 } bag = 0 numSlots = 20 family = 0 slots =
{ } (temporary) = false (temporary) = nil (temporary) = 0 (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) =
{ super =
{ } Bags =
{ } base =
{ } index =
{ } name = "BagnonInventory" ItemGroup =
{ } frames =
{ } count = 1 MainMenuButtons =
{ } Title = "%s's Inventory" } (temporary) = "owner" (temporary) = nil (temporary) = nil (temporary) =
{ super =
{ } base =
{ } frames =
{ } type = "Frame" count = 0 OpenSound = 862 FontH = GameFontHighlightLeft { } BrokerSpacing = 2 name = "BagnonFrame" MoneySpacing = 8 CloseSound = 863 Font = GameFontNormalLeft { } __index =
{ } MoneyFrame =
{ } BagGroup =
{ } } (temporary) = "owner" (temporary) = nil (*temporary) = "attempt to compare number with boolean"

qlesz commented 8 hours ago

If anyone else having this issue this is fast fix: add code below to file ..._classicera\Interface\AddOns\BagBrother\core\classes\itemGroup.lua line 112: profile.bagBreak = tonumber(profile.bagBreak) or 0 (add it before line starting with "if x > 0 and (profile.bagBreak >"