Hello, I am trying to pull my current LFG name and post it to a in-game community that I have. The code below works (with the exception of the commented out code). The problem I am having is that when I use the entryData.name variable in the SendChatMessage line of code I get an error message that there is a bad character in that line. However, when I print the entryData.name variable it works without issue. The BugTracker addon tells me that the variable is |Krs1|k instead of the title of the group. I tried to do tostring(entryData.name) but that didn’t make a difference. If anyone could offer some assistance that would be greatly appreciated. This is a big feature of my addon.
Thank you.
function Hyperspawn_Miscellaneous_lookingForMore()
– local entryData = C_LFGList.GetActiveEntryInfo()
local minimap = GetMinimapZoneText()
local zone = GetZoneText()
if UnitFactionGroup(“player”) == “Alliance” then
local id, name, _ = GetChannelName(“Community:357944461:1”)
if id > 0 and name ~= nil then
– if entryData.activityID > 0 then
– SendChatMessage(“LFM “…entryData…” PST!”, “CHANNEL”, nil, id);
– else
SendChatMessage(“LFM “…minimap…” (”…zone…") farm. PST!", “CHANNEL”, nil, id);
– end
else
print("|c00ffff00 [|c00A020F0Hyperspawn|c00ffff00]: You don’t appear to be a member of the Hyperspawn community.|r")
end
elseif UnitFactionGroup(“player”) == “Horde” then
local id, name, _ = GetChannelName(“Community:359059031:1”)
if id > 0 and name ~= nil then
– if entryData.activityID > 0 then
– SendChatMessage(“LFM “…entryData.name…” PST!”, “CHANNEL”, nil, id);
– else
SendChatMessage(“LFM “…minimap…” (”…zone…") farm. PST!", “CHANNEL”, nil, id);
– end
else
print("|c00ffff00 [|c00A020F0Hyperspawn|c00ffff00]: You don’t appear to be a member of the Hyperspawn community.|r")
end
end
end