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 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.

a ban skript help plis

Discussion in 'Skript' started by ELROMPEDIENTES, Jul 7, 2017.

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

    Joined:
    Feb 24, 2017
    Messages:
    191
    Likes Received:
    7
    The problem is there is an error in line 65 and every 1 second subtract 1 from {tempban::*}
    I whant to do like a tempban skript the ban player's just stay in the lobby because they cant use the menu because they have {ban.%player%} true
    Code (Skript):
    1. command /advertencia <player> <text>:
    2.     trigger:
    3.         if {permisso.helper.%player%} is true:
    4.             if arg 1 is set:
    5.                 if arg 2 is not set:
    6.                     send "&cKillaura, malcomportamiento, mods"
    7.                 else:
    8.                     if arg 2 is "killaura":
    9.                         set {ban.%arg 1%} to true
    10.                         send "{@logo}Kill aura tu ban sera asta que lo diga el staff" to arg 1
    11.                         teleport the arg 1 to {lobby}
    12.                     if arg 2 is "malcomportamiento":
    13.                         add 1 to {advertencia.%arg 1%}
    14.                         send "{@logo}Advertencia %{advertencia.%arg 1%}%/10"
    15.                         if {advertencia.%arg 1%} is more than or equal to 10:
    16.                             set {tempban.%arg 1%} to true
    17.                             add 30 to {tempban::%arg 1%}
    18.                             send "{@logo}Tienes 10 advertencias ban de 30 dias" to arg 1
    19.                             teleport the arg 1 to {lobby}
    20.                             wait 30 days#ignore this I goin to delete this
    21.                             delete {ban.%arg 1%}
    22.                     if arg 2 is "mods":
    23.                         set {ban.%arg 1%} to true
    24.                         add 30 to {tempban::%arg 1%}
    25.                         send "{@logo}Ban 30 dias por usar algun tipo de mods" to arg 1
    26.                         teleport the arg 1 to {lobby}
    27.                     if arg 2 is "delete":
    28.                         delete {advertencia.%arg 1%}
    29.                         delete {ban.%arg 1%}
    30.                         delete {tempban.%arg 1%}
    31.         else:
    32.             send "{@error}"
    33. every 1 second:
    34.     subtract 1 from {tempban::*}
    35. on join:
    36.     if {tempban::%player%} is less than 1:
    37.         send "{@logo}Tu ban a terminado esperamos que te comportes mejor"
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    217
    which line is 65th?
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    217
    oh sorry that a half of the skript my bad is the line 33
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    217
    And what error? :emoji_slight_smile:

    Try
    Code (Skript):
    1. every 1 second in world "%NAME_OF_YOUR_WORLD%":
    Sometimes it's an error without worldname, probably it's a bug.

    After ban you're setting {tempban:: player} arg to true and then you r trying to add or substract something from "true".
    try to make different list of data values for Time-in-ban and Banned-list.
     
    #4 ShaneBee, Jul 7, 2017
    Last edited by a moderator: Jul 7, 2017
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    217
    Im trying to do on 30 days remove that variable form a player or every day subtarct 1 from every player and add 30 to baned players variable
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    217
    You can't subtract 1 from a list. You should be using times, lists and uuids. the method is horrible right now.
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    217
    umm can you show me and example because Im not too advance and whant to join my server just 2 minutes to test a code I made if for wend someones die victims gamemode is goin to be 3 and is goin to be teleported above the attacker then respawn
     
Thread Status:
Not open for further replies.

Share This Page

Loading...