View Single Post
03-08-23, 10:32 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,891
You don't tell us what the error says which would be helpful but...

The SLASH_NOVIDADE1, SLASH_NOVIDADE2 etc. are for different slash commands that call the same function (in case one gets overwitten by another addon or you want to have say, a full addon name command and an acronym command (but you only need one) eg.:
Code:
SLASH_NOVIDADE1 = "/novidade"
SLASH_NOVIDADE2 = "/nvd"
if NOVIDADE_ToggleFrame is defined as a local function, it needs to be declared before the SlashCmdList entry is created
Lua Code:
  1. local function NOVIDADE_ToggleFrame()
  2.     MyFrame:SetShown(not MyFrame:IsShown ())
  3. end
  4.  
  5. SlashCmdList["NOVIDADE"] = function(msg)
  6.      NOVIDADE_ToggleFrame()
  7. end

I have no idea what the NOVIDADE_ToggleFrame function does so the code is just for exmple.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 03-08-23 at 01:20 PM.
  Reply With Quote