BankStack

BankStack

814k Downloads

IsBound Error when sorting Guild bank

gaveer opened this issue ยท 6 comments

commented

@kemayo hey there , i have error when i sorth guild bank

[string "=[C]:"]: in function 'IsBound'
[string "@BankStack\sort.lua"]:119: in function <BankStack\sort.lua:116>
[string "@BankStack\sort.lua"]:220: in function <BankStack\sort.lua:169>
[string "=[C]:"]: in function 'sort'
[string "@BankStack\sort.lua"]:299: in function 'Sort'
[string "@BankStack\sort.lua"]:37: in function <BankStack\sort.lua:12>
[string "@BankStack\core.lua"]:503: in function '?'
[string "@BankStack\ldb.lua"]:68: in function 'OnClick'
[string "@AutoOpenAnything\Libs\LibDBIcon-1.0\LibDBIcon-1.0-44.lua"]:144: in function 'oclick'
[string "@MBB\MBB-4.0.9.lua"]:428: in function <MBB\MBB.lua:416>

could be that you using the old LE_ITEM_CLASS_WEAPON and rest of them
Line 88-99

		Enum.ItemClass.Weapon,
		Enum.ItemClass.Armor,
		Enum.ItemClass.Container,
		Enum.ItemClass.Gem,
		Enum.ItemClass.ItemEnhancement,
		Enum.ItemClass.Consumable,
		Enum.ItemClass.Glyph,
		Enum.ItemClass.Tradegoods,
		Enum.ItemClass.Recipe,
		Enum.ItemClass.Battlepet,
		Enum.ItemClass.Questitem,
		Enum.ItemClass.Miscellaneous,

		
	-	Line234

		Enum.ItemClass.Armor
		Enum.ItemClass.Weapon
		
		- https://github.com/Stanzilla/WoWUIBugs/issues/218
		- https://wowpedia.fandom.com/wiki/ItemType#Item_Type
commented

Issue's just that I'm trying to make an ItemLocation for something that's not a real bag, because guild banks use a completely different system than everything else. I just need to special-case that check so that for a guild bank it skips it.

commented

Okay, new builds should be uploaded.

commented

Huh, that one is weird. It implies that ItemLocation:CreateFromBagAndSlot(bag, slot) is somehow not returning an ItemLocation, which I'm pretty sure should be impossible.

Could you tell me how you're running this?

commented

@kemayo still error apper

5x BankStack\sort.lua:121: bad argument #1 to 'IsBound' (Usage: local isBound = C_Item.IsBound(itemLocation))
[string "=[C]:"]: in function 'IsBound'
[string "@BankStack\sort.lua"]:121: in function <BankStack\sort.lua:116>
[string "@BankStack\sort.lua"]:223: in function <BankStack\sort.lua:172>
[string "=[C]:"]: in function 'sort'
[string "@BankStack\sort.lua"]:302: in function 'Sort'
[string "@BankStack\sort.lua"]:43: in function <BankStack\sort.lua:12>
[string "@BankStack\core.lua"]:503: in function <BankStack\core.lua:464>
[string "@BankStack\core.lua"]:499: in function <BankStack\core.lua:499>

Locals:
(*temporary) = <table> {
 Clear = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:29
 IsEquipmentSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:56
 IsEqualToBagAndSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:72
 SetBagAndSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:35
 IsBagAndSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:60
 SetEquipmentSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:46
 slotIndex = 32
 HasAnyLocation = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:64
 bagID = 4
 GetEquipmentSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:52
 IsEqualToEquipmentSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:80
 GetBagAndSlot = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:42
 IsValid = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:68
 IsEqualTo = <function> defined @FrameXML\ObjectAPI\ItemLocation.lua:88
}
commented

Ah, it's because it's running on an empty slot. It really shouldn't be doing that, but I can add guards to stop it erroring.