Thread Tools Display Modes
09-14-09, 05:18 AM   #1
MigGat
A Fallenroot Satyr
Join Date: Sep 2009
Posts: 27
How to send chat message with a tradeskill link?

Hi all,

I'm made an addon that keeps track of your guild members trade skills. The addon has their skill link in a table os you can print them any time.

There's no problem with printing like this:

printMessage = char .. ": ";
print(printMessage .. skillLink1); --skillLink1 contains the primary skill

But when I try to report on guild channel:

printMessage = char .. ": ";
SendChatMessage(printMessage .. skillLink1, "GUILD", nil);

Link is NO printed, only the char name is.

Any idea?
  Reply With Quote
09-14-09, 08:42 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
1. Are you getting any errors? (Make sure they're not hidden in Interface Options)

2. What exactly is the value of the skillLink1 variable?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-14-09, 08:42 AM   #3
zero-kill
A Firelord
 
zero-kill's Avatar
Join Date: Aug 2009
Posts: 497
That's weird if it works in normal chat, but then locks off on guild, maybe the "guild" hook is stopping it.

Last edited by zero-kill : 09-14-09 at 08:44 AM. Reason: sorry missread :P
  Reply With Quote
09-14-09, 08:48 AM   #4
MigGat
A Fallenroot Satyr
Join Date: Sep 2009
Posts: 27
There are no errors, just printing nothing

The value of skillLink1 is: "|cffffd000|Htrade:51313:450:450:600000001AF1889:47Kbb6a8f5Z7ms2nvbJPAAAAwDGABsAAyXzC987v2LdtHm//EED|h[Encantamiento]" , which is the internal setup for a link.

As I said, whenever I print(skillLink1) i get the actual Link on the chat frame, but

SendChatMessage("Anything->" .. skillLink1, "GUILD", nil);

will report

[Guild][Feadur]: Anything:
  Reply With Quote
09-14-09, 08:49 AM   #5
MigGat
A Fallenroot Satyr
Join Date: Sep 2009
Posts: 27
Notice that those links where previously aquired from de Guild channel
  Reply With Quote
09-14-09, 08:56 AM   #6
zero-kill
A Firelord
 
zero-kill's Avatar
Join Date: Aug 2009
Posts: 497
So when entered, it will print whatever is in the "Anything" position?
  Reply With Quote
09-14-09, 08:58 AM   #7
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
Your link seems to be missing "|h|r" at the end (closing the hyperlink- and color-tags). I don't know if this is the cause of your problem, but everything else looks okay to me.
__________________
« Website | GitHub »

Oh hai!
  Reply With Quote
09-14-09, 09:29 AM   #8
MigGat
A Fallenroot Satyr
Join Date: Sep 2009
Posts: 27
That worked for me Cargor!

Ir seems that print() function completes link if they're broken, but chat frames don't.

Thanks everyone
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to send chat message with a tradeskill link?


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