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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our 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.

Warp script deleting warps

Discussion in 'Skript' started by Kuzifes, Jan 29, 2018.

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

    Kuzifes Member

    Joined:
    Apr 25, 2017
    Messages:
    16
    Likes Received:
    0
    Full Code:
    Code ( (Unknown Language)):
    1. :
    2.    trigger:
    3.        if player has permission "warp.setwarp" or "warp.*":
    4.            if arg 1 is set:
    5.                remove arg 1 from {warps::*}
    6.                wait 1 tick
    7.                message " "
    8.                message "&e&l(!) %arg 1% has been set as a Warp."
    9.                message " "
    10.                add arg 1 to {warps::*}
    11.                set {warpTP::%arg 1%} to location of player
    12.            if arg 1 is not set:
    13.                message "&c(!) Please specify a warp name."
    14.        else:
    15.            message "&cYou do not have permission to set a warp."
    16. command /warps:
    17.    trigger:
    18.        message "&6&lWarps:"
    19.        loop {warps::*}:
    20.            message "&7* %loop-value%"
    21.  
    22. command /delwarp [<text>]:
    23.    trigger:
    24.        if player has permission "warp.delwarp" or "warp.*":
    25.            if arg 1 is set:
    26.                message " "
    27.                message "&c(!) %arg 1% has been removed from the list of warps."
    28.                message " "
    29.                remove arg 1 from {warps::*}
    30.            if arg 1 is not set:
    31.                message "&c(!) Please specify a warp name."
    32.        else:
    33.            message "&c(!) You do not have permission to execute this command."
    34.  
    35.  
    36.  

    Troubleshooting: When I use /delwarp to delete the warp, the location is still stored in the list without a name, anyone now how I can delete them with delwarp too?
     
  2. Best Answer:
    Post #2 by Wynnevir, Jan 29, 2018
  3. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    perhaps try deleting it instead.
    delete {warps::%arg 1%}
     
  4. Kuzifes

    Kuzifes Member

    Joined:
    Apr 25, 2017
    Messages:
    16
    Likes Received:
    0
    Thanks, works with using clear {warps::%arg 1%} and removing arg-1 from the list
     
    #3 Kuzifes, Jan 29, 2018
    Last edited: Jan 29, 2018
Thread Status:
Not open for further replies.
Loading...