WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   A little script help for kgpanels (https://www.wowinterface.com/forums/showthread.php?t=25307)

Clamsoda 01-06-13 12:49 PM

10 man:

Consider the logic: If in a raid, and the amount of group members is greater than, or equal to 1, and less than, or equal to 10, show. Else, hide.

Lua Code:
  1. local raid = GetNumGroupMembers()
  2. if IsInRaid() and raid >= 1 and raid <= 10 then
  3.      self:Show()
  4. else
  5.      self:Hide()
  6. end

25 man:

Consider the logic: If in a raid, and the amount of group members is greater than, or equal to 11(1 more than 10 man), and less than, or equal to 25, show. Else, hide.

Lua Code:
  1. local raid = GetNumGroupMembers()
  2. if IsInRaid() and raid >= 11 and raid <= 25 then
  3.      self:Show()
  4. else
  5.      self:Hide()
  6. end

Your issue is that your IF logic isn't representing the right amount of group members. Rather than re-thinking your code logic, take what USED to work, and supplement it with the new API.

Kapone 01-06-13 01:42 PM

yes i i copied wrong code i thought things might have change more then i thought but it was against all logic for me too hide on command.

Despite that my experiments didn't work and i gave up and left it as it is.
so i copied in a haste for lunch and shower too was of my rage ^^
Anyhow, thanks a bunch for the help the code works perfect now, i still don't get it why it didn't work first time i tried the codes u guys provided me with despite numerous ui reloads and game restarts it didnt want too work =/

Thanks again for all answers =)

Clamsoda 01-06-13 03:22 PM

Glad you got it working ^^. Let us know if you need anymore help!


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

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