Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unread 12-22-12, 02:59 AM   #1
gmarco
A Flamescale Wyrmkin
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 107
SendChatMessage and illegal chars

Hi all,

I continue to ask questions on questions and I am sorry about it, but I googled a lot but could not find a solution to this.

I'd like to write something in a CHAT channel. And it works fine, but I was unable to write a something with the escape code to make string colored.

A sample...


Lua Code:
  1. local prgname1 = "|cffffd200addon1|r"
  2. local prgname2 =  "addon2"
  3. local msg1 = string.format("Hello %s !", prgname1)
  4. local msg2 = string.format("Hello %s !", prgname2)
  5.  
  6. print (msg1)
  7. print (msg2)
  8. SendChatMessage(msg1, "GUILD")
  9. SendChatMessage(msg2, "GUILD")

The print(msg?) works quite well but the SendChatMessage only work when the var is prgname2 because in the other case it contains illegal chars.

I check them here: http://www.wowwiki.com/ValidChatMessageCharacters

The problem is that the code doesn't complains but doesn't print either when it found such strings.

I check also:

Lua Code:
  1. SendAddonMessage( "ADDON", "Test", "GUILD" );

But it also don't print either and probably it is not I need.

So the question is ?

Have I to convert the string with some function before passing to SendChatMessage or I have to use different output type ?

Thanks very much for attention as usual.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
gmarco is offline   Reply With Quote
 

Go BackWoWInterface » Developer Discussions » Lua/XML Help » SendChatMessage and illegal chars

Thread Tools
Display Modes

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