ItemVersion

ItemVersion

216k Downloads

Error while talking to enchanting trainer

arnvid opened this issue ยท 3 comments

commented

Description

Error came while buying new skills at the vendor.

Steps to Reproduce

  1. Just buying new skills
x33  ItemVersion\Tooltip.lua:16: bad argument #1 to 'strmatch' (string expected, got nil)
Stack: [string "=[C]"]: in function 'strmatch'
[string "@ItemVersion\Tooltip.lua"]:16: in function <ItemVersion\Tooltip.lua:14>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function 'SetTrainerService'
[string "*:OnEnter"]:3: in function <[string "*:OnEnter"]:1>
Time: 2021/01/12 11:39:00 Index: 3/3
Locals:
(*temporary) = nil
(*temporary) = ":(%w+)"
(*temporary) = "string expected, got nil"
commented

Should be fixed @arnvid in 2021.2.1. Has been released to CurseForge too.

Let me know if you still encounter the issue.

commented

@t-mart great news.. have just installed the update and will keep and eye out for this or anything else.

commented

Thanks for reporting this, @arnvid!

I was able to reproduce the error. I believe that the error comes from trying to lookup the spell id that crafts the item (example), not the item id of the resulting item (example). Spell ids and item ids are separate concepts, so one may not be used to get the other.

This addon only hooks into item tooltips, so I guess in this instance at the training vendor, the game is doing something funny by overloading item tooltip to display a spell.

I don't think its appropriate to be displaying item version info on a spell tooltip, so I will most likely prevent ItemVersion from adding anything to the tooltip in these cases.

At the very least, I will work on removing this lua error.