Weird Problem

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Anonymous

Member
Jan 27, 2017
15
0
0
23
code_language.skript:
on join:
  if player is not "VoidStacker" or "Macrolect" or "AnonymousKings" or "StrafinMC" or "KrazyXD" or "Qql" or "Lehoh":
    if {ips::*} contains "&f&l%player% &8- &b&l%player's IP%":
      message "&cALREADY CONTAINED"
    if {ips::*} does not contain "&b&l%player's IP%":
      add "&f&l%player% &8- &b&l%player's IP%" to {ips::*}
    else:
      broadcast "&c&lWHY DOESN'T THIS WORK"
This isn't working for some reason, no errors it just always messages error no matter what, I've deleted and cleared the {iplist::*} multiple times, nothing seems to work.
It always broadcast "Why doesn't this work"
 
Last edited:
I added a command to add something to this list and after I do that it works fine, it's almost like the list needs to be created before this works? Any ideas?
 
Going forward, please use the layout that we provided and @Snow-Pyon linked. It is also included in the notice when you create a new thread.

I've been told that using "contains" doesn't work sometimes. You can always use a loop instead.
code_language.skript:
on join:
    if player is not "VoidStacker" or "Macrolect" or "AnonymousKings" or "StrafinMC" or "KrazyXD" or "Qql" or "Lehoh":
        loop {ips::*}:
            if "%loop-value%" is "&f&l%player% &8- &b&l%player's IP%":
                message "&cALREADY CONTAINED"
                stop
        add "&f&l%player% &8- &b&l%player's IP%" to {ips::*}
        stop
 
  • Like
Reactions: Snow-Pyon
Status
Not open for further replies.