View Single Post
01-01-24, 04:34 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
These functions exist, but don't have any slash command strings registered for them.
Lua Code:
  1. SlashCmdList["UI_ERRORS_OFF"] = function(msg)
  2.     UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE");
  3.     SetCVar("Sound_EnableSFX", "0");
  4. end
  5.  
  6. SlashCmdList["UI_ERRORS_ON"] = function(msg)
  7.     UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE");
  8.     SetCVar("Sound_EnableSFX", "1");
  9. end
FrameXML\ChatFrame.lua:2379

You can call them using these commands.
Code:
/run SlashCmdList.UI_ERRORS_OFF()
/run SlashCmdList.UI_ERRORS_ON()
Note: msg is the string of arguments after the slash commands, usually an empty string for commands that don't use them. These functions don't even reference the variable so it's safe to omit it entirely.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote