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)
if not (UnitAffectingCombat('player') or UnitAffectingCombat(name)) then
local delay = GetCorpseRecoveryDelay()
if delay == 0 then
AcceptResurrect()
DoEmote('thank', name)
else
local formattedText = b:GetText(b:SetFormattedText("%d |4second:seconds;", delay))
SendChatMessage("Thanks for the rez! I still have "..formattedText.." until I can accept it.", 'WHISPER', nil, name)
end
end
end