WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MoP Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   Slash Command changes? (https://www.wowinterface.com/forums/showthread.php?t=43838)

nossy 08-03-12 03:20 PM

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.

Seerah 08-03-12 03:22 PM

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.

Haleth 08-03-12 03:28 PM

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).

nossy 08-03-12 03:31 PM

Quote:

Originally Posted by Seerah (Post 259228)
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.


All times are GMT -6. The time now is 01:14 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI