View Single Post
06-23-20, 10:06 PM   #7
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi all.

Thanks for your suggestions, I still have not been able to make it work but I have not given up just yet.
The print solution only prints it into my chat, it does not broadcast it to general.

From reading the escape sequences page it seems it should be as easy as
Lua Code:
  1. local chatString =  ("\124TInterface\\TargetingFrame\\UI-RaidTargetingIcon_8.png:0\124t")
  2. SendChatMessage(chatString, 'CHANNEL', nil, 1)
However when I run it in game I keep getting the following error
Lua Code:
  1. 1x SendChatMessage(): Invalid escape code in chat message
  2. [string "=[C]"]: ?
  3. [string "=[C]"]: in function `SendChatMessage'
  4. [string "@Swarm\Swarm-SR 2.7.8.32.lua"]:208: in function <Swarm\Swarm.lua:199>
  5. [string "@Swarm\Swarm-SR 2.7.8.32.lua"]:267: in function `func'
  6. [string "@FrameXML\UIDropDownMenu.lua"]:895: in function `UIDropDownMenuButton_OnClick'
  7. [string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>
  8.  
  9. Locals:
  10. (*temporary) = "|TTargetingFrame\UI-RaidTargetingIcon_8.png:0|t"
  11. (*temporary) = "CHANNEL"
  12. (*temporary) = nil
  13. (*temporary) = "1"

I tried a number combinations yet each time I got the same Invalid escape code in chat message error

I also tried just using the naked {rt8}
Lua Code:
  1. local chatString =  ({rt8})
  2. SendChatMessage(chatString, 'CHANNEL', nil, 1)
When I run this I get the following error
Lua Code:
  1. 1x Usage: SendChatMessage(text [,type] [,language] [,targetPlayer])
  2. [string "=[C]"]: ?
  3. [string "=[C]"]: in function `SendChatMessage'
  4. [string "@Swarm\Swarm-SR 2.7.8.32.lua"]:208: in function <Swarm\Swarm.lua:199>
  5. [string "@Swarm\Swarm-SR 2.7.8.32.lua"]:267: in function `func'
  6. [string "@FrameXML\UIDropDownMenu.lua"]:895: in function `UIDropDownMenuButton_OnClick'
  7. [string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>
  8.  
  9. Locals:
  10. (*temporary) = <table> {
  11. }
  12. (*temporary) = "CHANNEL"
  13. (*temporary) = nil
  14. (*temporary) = 1
So I am still stumped.

Any further help or suggestions would be greatly appreciated.
  Reply With Quote