I am having an error doing a SendChatMessage() to send a notification to guild chat to announce a "ding". In this message I want to include my /played information so I have the following code:
to get time played in string:
Code:
if (event == "TIME_PLAYED_MSG") then
if (arg1 ~= nil) then
--Get time played
timePassed = SecondsToTime(arg1);
end
end
then to send the message I do:
Code:
SendChatMessage("Ding Notification!!! - I just reached level " .. newlvl .. " in " .. timePassed, "GUILD", nil,nil);
this is giving the followin error:
Date: 2008-05-18 15:36:10
ID: 52
Error occured in: Global
Count: 1
Message: SendChatMessage(): Invalid escape code in chat message
Debug:
[C]: ?
[C]: ?
[C]: ?
[C]: SendChatMessage_Org()
ChatMOD\inc\ChatMOD.lua:571:
ChatMOD\inc\ChatMOD.lua:554
Identity\Identity.lua:147: SendChatMessage()
DingRecorder\DingRecorder.lua:79: GuildNotify()
[string "GuildNotify("2");"]:1: in main chunk
[C]: RunScript()
..\FrameXML\ChatFrame.lua:1598: value()
..\FrameXML\ChatFrame.lua:3040: ChatEdit_ParseText()
..\FrameXML\ChatFrame.lua:2732: ChatEdit_SendText()
..\FrameXML\ChatFrame.lua:2753: ChatEdit_OnEnterPressed()
[string "*:OnEnterPressed"]:1:
[string "*:OnEnterPressed"]:1
|
Any Ideas?
I did a test code of
Code:
DEFAULT_CHAT_FRAME:AddMessage("timePassed: " ..timePassed)
and it shows up as "timePassed: 50 Days 10hrs" so I dont know what could be an escape code.