I am testing and debugging sending myself a whisper. This addon, PriceAnswer, should reply to this whisper
where N is optional, default of 1 for the quantity, and item can be an itemLink, itemID, or itemName. PriceAnswer ought to reply with gold values for that item based on TradeSkillMaster calculations.
The debug self:Print() statements on lines 158 & 159 of Core.lua do correctly print prices for valid items, so I know PA is getting valid and correct prices from TSM. However, the following SendChatMessage lines do not reply with anything, and I'm out of ideas why that's the case.
Further, I'd hoped to "harden" PA in case someone asked for a price for an invalid item.
triggers BugSack saying that lines 186-194 of Core.lua are expecting an itemLink, itemName, or itemID. I thought I'd caught such a situation, but apparently not.
Attached is the full PriceAnswer addon, which should work in any release version of the game. PA does require TradeSkillMaster of course.
Any ideas why SendChatMessage is not whispering senderName (me, for testing), or how to truly "harden" the addon against invalid items?
Edit: here is the TradeSkillMaster Lua API, although I seem to be using it correctly.
https://api.tradeskillmaster.com/addon/