Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-13-22, 01:27 PM   #1
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
SendChatMessage is printing nothing

I am testing and debugging sending myself a whisper. This addon, PriceAnswer, should reply to this whisper
Code:
price N item
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.
Code:
price sally
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/
Attached Files
File Type: zip PriceAnswer.zip (167.5 KB, 49 views)

Last edited by myrroddin : 08-13-22 at 01:28 PM. Reason: linked TSM Lua API
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » SendChatMessage is printing nothing


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off