Unfit-1.0

Unfit-1.0

3.8k Downloads

Error with bags...

Torsin opened this issue ยท 0 comments

commented

Installed the 7.0.2 build of Bagnon and am still getting the below error from my Guild and Personal Bank, this is caused by various Bags in the pane I think because the subclass is 0. In particular the three variables are returned as:

slot: INVTYPE_BAG
class: 1 (a.k.a. LE_ITEM_CLASS_CONTAINER)
subclass: 0

Message: Interface\AddOns\Bagnon\libs\Unfit-1.0\Unfit-1.0.lua:125: attempt to index field '?' (a nil value)
Time: 07/19/16 19:25:36
Count: 27
Stack: [C]: ?
Interface\AddOns\Bagnon\libs\Unfit-1.0\Unfit-1.0.lua:125: in function <Interface\AddOns\Bagnon\libs\Unfit-1.0\Unfit-1.0.lua:123>
(tail call): ?
Interface\AddOns\Bagnon\common\components\item.lua:367: in function UpdateBorder' Interface\AddOns\Bagnon\common\components\item.lua:399: in functionUpdateSearch'
Interface\AddOns\Bagnon\common\components\item.lua:251: in function `DelayedUpdates'
Interface\AddOns\Bagnon\common\components\item.lua:245: in function <Interface\AddOns\Bagnon\common\components\item.lua:243>

Locals:

To work around it I just threw in an if not container statement within IsItemUnusable prior to call the IsClsssUnusable function:

        if class ~= LE_ITEM_CLASS_CONTAINER then
            return Lib:IsClassUnusable(class, subclass, slot)
        end

I guess as an alternative you could just allow weapons and armor to pass to the function, but up to you.