Thread Tools Display Modes
10-04-12, 08:50 AM   #1
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Slash command not registering??

So I for some reason or another, my slash commands for SLASH_OSDUNGCHAL1 = "/c5"; and SLASH_OSDUNGCHAL2 = "/dchallenge"; don't get executed. Any ideas?

Lua Code:
  1. function osSetType(type, index)
  2.     if type == "party" then
  3.         SetDungeonDifficultyID(index)
  4.     elseif type == "raid" then
  5.         SetRaidDifficulty(index)
  6.     end
  7. end
  8.  
  9. -- 5 man
  10.  
  11. SlashCmdList.OSDREGFIVE = function()
  12.     osSetType("party",1)
  13. end
  14.  
  15. SlashCmdList.OSDHERFIVE = function()
  16.     osSetType("party",2)
  17. end
  18.  
  19. SlashCmdList.OSDUNGCHAL1 = function()
  20.     osSetType("party",8)
  21. end
  22.  
  23. SlashCmdList.OSDUNGCHAL2 = function()
  24.     osSetType("party",8)
  25. end
  26.  
  27. SLASH_OSDREGFIVE1 = "/r5";
  28. SLASH_OSDHERFIVE1 = "/h5";
  29. SLASH_OSDUNGCHAL1 = "/c5";
  30. SLASH_OSDUNGCHAL2 = "/dchallenge";
  31.  
  32. -- 10 man
  33.  
  34. SlashCmdList.OSDREGTEN = function()
  35.     osSetType("raid",1)
  36. end
  37.  
  38. SlashCmdList.OSDHERTEN = function()
  39.     osSetType("raid",3)
  40. end
  41.  
  42. SLASH_OSDREGTEN1 = "/r10";
  43. SLASH_OSDHERTEN1 = "/h10";
  44.  
  45. -- 25 man
  46.  
  47. SlashCmdList.OSDREGTWOFIVE = function()
  48.     osSetType("raid",2)
  49. end
  50.  
  51. SlashCmdList.OSDHERTWOFIVE = function()
  52.     osSetType("raid",4)
  53. end
  54.  
  55. SLASH_OSDREGTWOFIVE1 = "/r25";
  56. SLASH_OSDHERTWOFIVE1 = "/h25";
  Reply With Quote
10-04-12, 09:31 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
Originally Posted by suicidalkatt View Post
Code:
SlashCmdList.OSDUNGCHAL1 = function()
	osSetType("party",8)
end

SlashCmdList.OSDUNGCHAL2 = function()
	osSetType("party",8)
end

SLASH_OSDUNGCHAL1 = "/c5";
SLASH_OSDUNGCHAL2 = "/dchallenge";
The SLASH_* variables are missing their index number, note this should be SLASH_OSDUNGCHAL11 and SLASH_OSDUNGCHAL21 with the code as-is. Since both functions are the same code, I would suggest combining them into SlashCmdList.OSDUNGCHAL and leaving the SLASH_* variables the way they are. This would mean they get their proper indices of 1 and 2.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
10-04-12, 05:28 PM   #3
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by SDPhantom View Post
The SLASH_* variables are missing their index number, note this should be SLASH_OSDUNGCHAL11 and SLASH_OSDUNGCHAL21 with the code as-is. Since both functions are the same code, I would suggest combining them into SlashCmdList.OSDUNGCHAL and leaving the SLASH_* variables the way they are. This would mean they get their proper indices of 1 and 2.
How did I manage to not see that >.>... I really shouldn't stay up so late I spose.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Slash command not registering??


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