arkayenro / arkinventory

A World of Warcraft Inventory mod for Retail, Burning Crusade, and Classic
108 stars 14 forks source link

Error with tooltips and new version of Opie #1010

Closed Fraktyl closed 6 years ago

Fraktyl commented 6 years ago

With the new version of Opie if you get a tooltip on items that aren't actually in your inventory you get an error. These are items that could have been part of a slice for other characters. e.g. Heal Pots, Mana Pots, bandages, etc.

The error is: 182x ArkInventory\ArkInventoryTooltip.lua:621: attempt to index field 'ARK_Data' (a nil value) ArkInventory\ArkInventoryTooltip.lua:621: in function <ArkInventory\ArkInventoryTooltip.lua:604> (tail call): ?

C: in function `tipFunc' OPie\OPieUI.lua:170: in function <OPie\OPieUI.lua:152> OPie\OPieUI.lua:253: in function <OPie\OPieUI.lua:225>

Locals: tooltip = GameTooltip { 0 = default = 1 } arg1 = 133575 arg2 = nil arg3 = nil arg4 = nil (temporary) = nil (temporary) = GameTooltip { 0 = default = 1 } (temporary) = true (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (temporary) = nil (*temporary) = "attempt to index field 'ARK_Data' (a nil value)" type = defined =C:-1

Going to let the Opie author know also.

arkayenro commented 6 years ago

what version of AI are you using?

arkayenro commented 6 years ago

copy and paste the line below into your chat window and let me know if it returns anything apart from an empty array, ie { }

/run ArkInventory.Output( { AltGameTooltip } )

arkayenro commented 6 years ago

i've altered my code so it wont barf when other mods create a tooltip object the way opie has

Fraktyl commented 6 years ago

Sorry about that. Got tied up and away from a computer yesterday.

I ran the command above:

[07:51:34]ArkInventory: { [1]={ [0]=userdata, [default]=1 } }

Also, this is with the latest alpha code you put out. Apologies for the late response

arkayenro commented 6 years ago

can you test the r706-alpha, the new tooltip code is in there

Fraktyl commented 6 years ago

That fixed it! Thanks Arkayenro!

hollo6 commented 6 years ago

Please don't rename Bag to Backpack if possible, makes the tooltip huge if you have many alts and items scattered everywhere.

arkayenro commented 6 years ago

fixed in 3.07.43