Solved Skript ignores Command

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

Runakai

Supporter
Apr 27, 2018
496
32
28
21
Hello! I was coding a Ontime skript. As soon as the Command is underneath everything, skript just ignores it.

code_language.skript:
on join:
    if {ontime.Sekunde.%player%} is not set:
        set {ontime.Sekunde.%player%} to 0
    if {ontime.Minute.%player%} is not set:
        set {ontime.Minute.%player%} to 0
    if {ontime.Stunde.%player%} is not set:
        set {ontime.Stunde.%player%} to 0  
    if {ontime.Tag.%player%} is not set:
        set {ontime.Tag.%player%} to 0  
every second:
    loop all players:
        if {ontime.Sekunde.%loop-player%} is less than 60:
            add 1 to {ontime.Sekunde.%loop-player%}
        else:
            set {ontime.Sekunde.%loop-player%} to 0
            if {ontime.Minute.%loop-player%} is less than 60:
                add 1 to {ontime.Minute.%loop-player%}
            else:
                if {ontime.Stunde.%loop-player%} is less than 24:
                    add 1 to {ontime.Stunde.%loop-player%}
                    set ontime.Minute.%loop-player%} to 0
                else:
                    add 1 to {ontime.Tag.%loop-player%}
                    set {ontime.Stunde.%loop-player%} to 0
command /ontime:
    trigger:
        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!"


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
 
line 22
code_language.skript:
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
[doublepost=1524859187,1524859112][/doublepost]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
 
line 22
code_language.skript:
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
[doublepost=1524859187,1524859112][/doublepost]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
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.
 
: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
 
Status
Not open for further replies.