WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Slash command not registering?? (https://www.wowinterface.com/forums/showthread.php?t=44622)

suicidalkatt 10-04-12 08:50 AM

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";

SDPhantom 10-04-12 09:31 AM

Quote:

Originally Posted by suicidalkatt (Post 265859)
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.

suicidalkatt 10-04-12 05:28 PM

Quote:

Originally Posted by SDPhantom (Post 265862)
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. :rolleyes:


All times are GMT -6. The time now is 04:53 PM.

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