Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-03-11, 05:39 AM   #1
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Exclamation 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:
<in C code>: ?
<in C code>: in function `SendChatMessage'
wIn1-5.0\wIn1.lua:131: in function `?'
wIn1-5.0\wIn1.lua:617: in function <wIn1\wIn1.lua:616>

Locals:
(*temporary) = "Thanks for the rez! I still have 14 |4second:seconds; until I can accept it."
(*temporary) = "WHISPER"
(*temporary) = nil
(*temporary) = "nameremoved"
the error here seems to be todo with the event hand, of what is not near the main code

Code:
	local frame = CreateFrame('Frame')
	frame:Hide()

	for event, handler in pairs(eventHandlers) do
		frame[event] = handler
		frame:RegisterEvent(event)
		eventHandlers[event] = nil
	end

	frame:SetScript('OnEvent', function(self, event, ...)
		self[event](...)
	end)
but the error it self


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
				SendChatMessage(("Thanks for the rez! I still have %d |4second:seconds; until I can accept it."):format(delay), 'WHISPER', nil, name)
			end
		end
	end
anyhelp would be great, thanks
__________________
wMmap :: Is a lightweight Minimap, with a sleek look & custom imagery.
wIn1 :: In one addon. and is very lightweight & simple to use.
wChat :: Is a lightweight chat mod.
wBroker :: Is A simple broker add-on.
wPetXPBar :: Is A simple lightweight Pet XP Bar.
wBuffs :: Is A simple Buffs Bar.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » SendChatMessage help


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