1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!


    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Skript help - Defining multiple list variables in "contains"

Discussion in 'Skript' started by CustomWorldYT, Jul 13, 2018.

Thread Status:
Not open for further replies.
  1. CustomWorldYT

    CustomWorldYT Member

    Jun 17, 2018
    Likes Received:
    Skript Version: 2.2 dev36 (latest)
    Skript Author: Bensku
    Minecraft Version: 1.12

    I'm trying to do ranks for my FreeOP server in Skript. I can't use permissions, because it's FreeOP (where everyone is opped). I have in game command for setting rank. But now I want to define multiple list variables in "contains", so if player is in moderator list or in helper list (for example), it will do certain action, else cancel the event: player is not staff. I have tired to put the variables in brackets, but it always kept canceling the event, just like if player wasn't staff, even if he was in the {list::variable::*} list variable. My question is, how to define multiple list variables in 'contains' properly.

    Code (Skript):
    2. command /setrank <player> <text>:
    3.     executable by: console
    4.     trigger:
    5.         if arg 1 is set:
    6.             if arg 2 is set:
    7.                 if arg 2 is "helper":
    8.                     add argument 1 to {staff::helpers::*}
    9.                     broadcast "Adding &e%arg 1% &cto the helpers list."
    10.                     stop
    11.                 if arg 2 is "moderator" or "mods":
    12.                     add argument 1 to {staff::moderators::*}
    13.                     broadcast "Adding &e%arg 1% &cto the moderators list."
    14.                     stop
    15.                 if arg 2 is "owner":
    16.                     add argument 1 to {staff::owners::*}
    17.                     broadcast "&c&lAdding &e%arg 1% &cto the &lOWNERS &clist."
    18.                     stop
    19.                 else:
    20.                     message "Invalid rank" to player
    22. command /test:
    23.     trigger:
    24.        [B] if ({staff::moderators::*}, {staff::helpers::*} or {staff::owners}) contains player's name:[/B]
    25.             message "works" to player
    26.         else:
    27.             message "sad panda :(" to player
    Errors on Reload:

    Code (Skript):
    1. None.
    Console errors:
    Code (Skript):
    1. none
    Other Useful Info:

    Addons using (including versions):


    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes
    What other methods have you tried to fix it? I tired to do it without brackets, but the result was same.
  2. Best Answer:
    Post #2 by TPGamesNL, Jul 13, 2018
  3. TPGamesNL

    Supporter Addon Developer Dev Programme

    Jan 20, 2018
    Likes Received:
    Try adding those 3 lists to a temporary list variable and check if that contains the player. Also the owners variable is not a list variable
Thread Status:
Not open for further replies.

Share This Page