WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   need help with error "SendChatMessage(): Invalid escape code in chat message" (https://www.wowinterface.com/forums/showthread.php?t=16365)

thejoester 05-18-08 10:58 PM

need help with error "SendChatMessage(): Invalid escape code in chat message"
 
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:

Quote:

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.


All times are GMT -6. The time now is 07:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI