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.

Solved Skript ignores Command

Discussion in 'Skript' started by Runakai, Apr 27, 2018.

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

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Hello! I was coding a Ontime skript. As soon as the Command is underneath everything, skript just ignores it.

    Code (Skript):
    1.  
    2. on join:
    3.     if {ontime.Sekunde.%player%} is not set:
    4.         set {ontime.Sekunde.%player%} to 0
    5.     if {ontime.Minute.%player%} is not set:
    6.         set {ontime.Minute.%player%} to 0
    7.     if {ontime.Stunde.%player%} is not set:
    8.         set {ontime.Stunde.%player%} to 0  
    9.     if {ontime.Tag.%player%} is not set:
    10.         set {ontime.Tag.%player%} to 0  
    11. every second:
    12.     loop all players:
    13.         if {ontime.Sekunde.%loop-player%} is less than 60:
    14.             add 1 to {ontime.Sekunde.%loop-player%}
    15.         else:
    16.             set {ontime.Sekunde.%loop-player%} to 0
    17.             if {ontime.Minute.%loop-player%} is less than 60:
    18.                 add 1 to {ontime.Minute.%loop-player%}
    19.             else:
    20.                 if {ontime.Stunde.%loop-player%} is less than 24:
    21.                     add 1 to {ontime.Stunde.%loop-player%}
    22.                     set ontime.Minute.%loop-player%} to 0
    23.                 else:
    24.                     add 1 to {ontime.Tag.%loop-player%}
    25.                     set {ontime.Stunde.%loop-player%} to 0
    26. command /ontime:
    27.     trigger:
    28.         send "&8[&cOntime&8] &7Du bist &6%{ontime.Sekunde.%player%}% &7Sekunden, &6%{ontime.Minute.%player%}% &7Minuten, &6%{ontime.Stunde.%player%}% &7Stunden und &6%{ontime.Tag.%player%}% &7Tag(e) online gewesen!"
    29.  
    30.  

    When i use "/ontime" i get the message that this comman does not exist.

    I am using the current version of skript.
    Addons:
    -MundoSK
    -Skellet
    -SkMorkaz
    -SkQuery(Lime)
    -skRayFall
    -TuSKe
    -Umbaska
     
  2. Best Answer:
    Post #2 by ShaneBee, Apr 27, 2018
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    line 22
    Code (Skript):
    1. set ontime.Minute.%loop-player%} to 0
    You are missing the starting bracket for your variable
    When you reload skript you should see that error
    --- Double Post Merged, Apr 27, 2018, Original Post Date: Apr 27, 2018 ---
    Also, which version of Skript/Author are you running?
    Which version of MC are you running?

    I ran the command and it send "
    [12:58:47 INFO]: [Ontime] Du bist <none> Sekunden, <none> Minuten, <none> Stunden und <none> Tag(e) online gewesen!"
    So the command part seems to be fine, but you need to fix your variable
     
  4. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Oh, wow. I was just dumb. Now it works! Thanks. Well anyway, i am running 1.8.8 and i didn't see any errors while reloading the skript.
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    :emoji_slight_smile: youre welcome
    I always suggest reading your console errors first, as that will solve most of your problems 99.9% of the time
     
Thread Status:
Not open for further replies.

Share This Page

Loading...