Thread: Slash Commands
View Single Post
04-02-16, 09:28 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
wowprogramming.com and wowpedia.org are two good sites.

You should be getting an error which is why you're seeing this behaviour so, you need to turn on "Display lua Errors" in the Interface\Help options or better yet get
BugGrabber and BugSack

Anything local needs to be declared before it is called so in this case to create a toggle,
Code:
local UIConfig = CreateFrame("Frame", "MUI_BuffFrame", UIParent, "BasicFrameTemplateWithInset");
UIConfig:SetSize(50, 50)
UIConfig:ClearAllPoints()
UIConfig:SetPoint("CENTER")

SlashCmdList["RAIDLOCKREPORT"] = function() 
    DEFAULT_CHAT_FRAME:AddMessage("Working");
    if not UIConfig:IsShown() then
        UIConfig:Show()
    else
        UIConfig:Hide()
    end
end
SLASH_RAIDLOCKREPORT1 = "/raidlockreport";
SLASH_RAIDLOCKREPORT2 = "/rlr";
Edit: Updated so you can see something.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 04-02-16 at 09:36 PM.
  Reply With Quote