Monday, April 16, 2012

Filtering the UI Errors Frame

I'm trying to make an extremely watered down version of ErrorMonster. I've constructed a simple chat filter using the AddMessageEventFilter API, but I can't for the life of me figure out which channel to filter. I know I'm close because when I filtered from the channel "CHAT_MSG_SAY" the text only appears in the chat bubble above my players head and not in the chat log, so I think it's filtering right, just not the right channel. Any help would be greatly appreciated.

function NoRSpam_setSysFilters()

Out("Setting Filters...");

local function myChatFilter(msg)

if(string.find(msg, "Not enough energy")) then

return true

end

end



ChatFrame_AddMessageEventFilter("UIErrorsFrame", myChatFilter)

end|||try using swatter or ImprovedErrorFrame.|||Doesn't ErrorMonster filter combat error messages rather than UI error messages? Which are you trying to do here?

Regardless, I don't think your approach is right because neither of these show up in the chat frame so you can't filter on a chat channel for them.|||Quote:








Doesn't ErrorMonster filter combat error messages rather than UI error messages? Which are you trying to do here?

Regardless, I don't think your approach is right because neither of these show up in the chat frame so you can't filter on a chat channel for them.




Ahh ok, I'm trying to filter the error messages like "Out of range","Not enough energy", etc. Ill take a look at those mods and see how they work. Thanks.

No comments:

Post a Comment