SendChatMessage help
HEY ALL, I have seen this 1 time but now a few others have, on my autoress code you get an error, it seems to be to do with the SendChatMessage when in combat, a message will say cant till xamount of time.
Code:
1x SendChatMessage(): Invalid escape code in chat message: Code:
local frame = CreateFrame('Frame') Code:
eventHandlers['RESURRECT_REQUEST'] = function(name) |
"|" is a special character, not sure what you need it for in your string :)
|
Quote:
im not sure why that is there. im sure i read something about use it. |
I also had problems with using grammar UI escape sequences in SendChatMessage, for the same pipe character "|" reason that Rilgamon just explained
Dridzt has posted a workaround for setting and grabbing the formatted text from a frame Code:
local b = CreateFrame("Button") Code:
eventHandlers['RESURRECT_REQUEST'] = function(name) |
oh nice one. i will try this out. if i put the local b = CreateFrame("Button")
in with the code. it should work out right. Code:
eventHandlers['RESURRECT_REQUEST'] = function(name) |
I do have one question, why use that method?
All it does is return "%d seconds" and all that again does is put the GetCorpseRecoveryDelay() value (number) so it is "0 seconds", wouldn't it just be easier to do this? Code:
eventHandlers['RESURRECT_REQUEST'] = function(name) |
Quote:
|
Because
"%d |4second:seconds;" will automatically select "second" or "seconds" depending on the number in %d. |
I did not know that Xinhuan, thanks!
"|#A:B;" I guess where A is single form and B is plural form. What does the "4" mean? But what does # do? Is there some sort of lexicon over the type of "|...;" you can create? Trying to figure if it's something to WoW LUA only or if regular LUA also supports such syntaxes in strings. |
|1 is used is to choose the word if the preceding number is a 1 or 0
|1steve;frank; will return steve for any number ending in 1 or 0 (0,1, 10,11, 20,21...) |2 is really for french i think, will change de to d' and remove the space if the next word starts with a vowel |3 is for German, and |4 is singular/plural detector |4second:seconds; for proper word choosing |
Quote:
|
All times are GMT -6. The time now is 10:39 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI