Thread Tools Display Modes
08-03-12, 03:20 PM   #1
nossy
A Defias Bandit
Join Date: Apr 2011
Posts: 3
Slash Command changes?

Not sure what I'm missing here...going through and updating/testing my small addons for MoP and having issues with slash commands on two of my addons but not on the other. With the addons that are not working, if I type /slashcommand the client does not allow me to press enter. Has something changed with the way slash commands are used/initialized in MoP?

This addon works:

Code:
AMFG_LazyWTF_Emote_List = {} -- initialize array
SLASH_AMFGLAZYWTF1 = '/wtf';

function SlashCmdList.AMFGLAZYWTF(msg, editbox)
	//Code is here, omitted for simplicity

end
This addon doesn't:

Code:
SLASH_AMFGLAZYRC1 = '/rc';
function SlashCmdList.AMFGLAZYRC(msg, editbox)
	//Vode is here, omitted for simplicity
end
Interestingly enough, if I remove the first line from the first addon (the array initialization) that slash command also ceases to work. I'm assuming this is one of those cases of me doing something incorrect that just happens to have worked on Live for the last two xpacs and the latest expansion breaking it.
 
08-03-12, 03:22 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
When you press enter, the client is getting a Lua error, which is why the chat editbox stays open with your text inside. It's trying to execute your code, but there's something wrong with it.

Turn on Lua errors in Interface Options and you should see what the problem is.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

 
08-03-12, 03:28 PM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
It'd help if you posted the function as well, so we can see what's wrong with them (do post the lua error too).
 
08-03-12, 03:31 PM   #4
nossy
A Defias Bandit
Join Date: Apr 2011
Posts: 3
Originally Posted by Seerah View Post
When you press enter, the client is getting a Lua error, which is why the chat editbox stays open with your text inside. It's trying to execute your code, but there's something wrong with it.

Turn on Lua errors in Interface Options and you should see what the problem is.
That explains it, I forgot that by default LUA error's don't popup and the Beta client is a fresh install. That's all I needed, now I can go find the problems in my code. Thanks much.
 
 

WoWInterface » Site Forums » Archived Beta Forums » MoP Beta archived threads » Slash Command changes?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off