View Single Post
08-13-22, 04:24 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Don't know what's going on with SendChatMessage() if your debug prints are showing correct information.



Originally Posted by myrroddin View Post
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.
Honestly, I'd run it through pcall() and let GetItemInfoInstant() handle validation. Not the most elegant solution, but we don't have that many options. That being said, itemName only works if you have the item on you. Not that useful for someone asking for an item they have, but you don't.

Another thing I'd add is stop normal chat traffic from being processed, causing your pattern matching to return nils and throw errors further down.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 08-13-22 at 04:29 PM.
  Reply With Quote