Help with slash command
Just trying to create a reeaaaally simple addon, but I can't get the slash commands to work. When I try them ingame, I just get the "Type '/help' for a listing of a few commands." message as if they don't exist.
Code:
RegisterAddonMessagePrefix("adry") |
This is all very confusing to what you're trying to do, looks like you just copied various things and tried to make it work for you.
I'm guessing you're wanting a slash command to play a certain sound file depending on what you feed into your slash command. If so... Code:
SLASH_ADRY1 = '/adry' Here's a reference for creating slash commands: http://www.wowwiki.com/Creating_a_slash_command When creating nested if statements you need to combine else and if -> elseif : http://www.lua.org/pil/4.3.1.html More information of what you're trying to do would've been nice and would lead to more thorough help. |
Thanks for the help, sorry I wasn't very descriptive. I'm trying to make it play those sounds not just to me but to other people with the addon in my party (intending to give it to my arena partners).
|
1. Install BugSack. Based on your description of the problem, you're almost certainly getting an error message that will tell you exactly what and where the problem is in your code, but Blizzard in their infinite wisdom decided not to display error messages by default, and their optional error display is useless for development anyway, since it can't show you errors that occur during loading, which is when this kind of error (most likely a syntax error) is happening.
2. That code is rather messy anyway. Here's a better version (feel free to delete all the comments to shorten it up once you've gone over it and understand what's going on): Code:
-- Put all the commands and sounds here so it's easier to add more |
All times are GMT -6. The time now is 01:48 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI