Solved Timespan between 30 days, Showing 24 days

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

FilipeNock

Member
Jan 26, 2017
77
7
3
24
Brazil
www.youtube.com
Skript Version: Skript 2.2 SNAPSHOT
Skript Author: NJol
Minecraft Version: 1.8.8 Spigot
---
I have a problem, the reward timespan is showing 24 days, but I put it to 30 days
rvD9PYF.png


Full Code:
code_language.skript:
command /reward:
    trigger:
        set {_waited} to difference between {countdown.%player%} and now
        if {_waited} is less than 30 days:
            set {_time} to difference between 30 days and {_waited}
            send "&a%{_time}% to next reward"
        else:
            set {countdown.%player%} to now
            send "&b&lYou received an Reward"


Errors on Reload:
nope

Console Errors: (if applicable)
nope


Other Useful Info:

Addons using (including versions):
Skellett v1.7.7cskRayFall v1.8Umbaska v2.0 Beta 5.5.1SkQuery v3.22.11MundoSK v1.7.5-BETA.7.125WildSkript v1.8WolvSK v1.5.1

Troubleshooting:

Have you tried searching the docs? no
Have you tried searching the forums? No
What other methods have you tried to fix it? timespan in hours
 
Skript has this slight issue, where time spans are actually integers (or something like that, I can't remember the specifics). So the maximum you can do is 24 days.

EDIT:
Yeah, Skript uses integers for timespans. Use either Mirriducki's version of Skript, my version of Skript or Benskus fork
https://forums.skunity.com/wiki/skript/
 
Last edited by a moderator:
Você tem este pequeno problema, onde o tempo é realmente inteiros (ou algo assim, não me lembro dos detalhes). Então o máximo que você pode fazer em 24 dias.

EDITAR:
Sim, números de telefone úteis para timespans. Use uma versão de Mirriducki de Skript, minha versão de Skript ou forquilha de Benskus
https://forums.skunity.com/wiki/skript/
Mas se eu usar a versão Bensku, meus códigos. Eu uso atualmente nesta versão irá dar erros
 
Last edited by a moderator:
Please use English. This is an English forum and is the only language I speak.
i'm using Google Translator /;
[doublepost=1487081929,1487081893][/doublepost]
Mas se eu usar a versão Bensku, meus códigos. Eu uso atualmente nesta versão irá dar erros
But if I use the Bensku version, my codes. I currently use this version will give errors
 
Don't download the dev24 version, that breaks everything. Download dev23 instead.
--
Baixa a versão dev23, a dev24 não é estavel e da erro em (quase) tudo.
 
  • Like
Reactions: FilipeNock
Don't download the dev24 version, that breaks everything. Download dev23 instead.
--
Baixa a versão dev23, a dev24 não é estavel e da erro em (quase) tudo.
offline player error /:
code_language.skript:
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! [Skript] Severe Error:
[13:52:50] [ERROR]: #!#! An error happened when trying to enably resolving offline players, so the feature has been turned off. Please report this at https://github.com/bensku/Skript/issues/237
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[13:52:50] [ERROR]: #!#! If you're a server admin however please go to https://github.com/bensku/Skript/issues/
[13:52:50] [ERROR]: #!#! and check whether this error has already been reported.
[13:52:50] [ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service),
[13:52:50] [ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[13:52:50] [ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[13:52:50] [ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Stack trace:
[13:52:50] [ERROR]: #!#! java.lang.NullPointerException: null offline player resolve queue
[13:52:50] [ERROR]: #!#!     at ch.njol.skript.bukkitutil.UnresolvedOfflinePlayer$1.run(UnresolvedOfflinePlayer.java:58)
[13:52:50] [ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Version Information:
[13:52:50] [ERROR]: #!#!   Skript: 2.2-dev23
[13:52:50] [ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
[13:52:50] [ERROR]: #!#!   Minecraft: 1.8.8
[13:52:50] [ERROR]: #!#!   Java: 1.8.0_121 (Java HotSpot(TM) 64-Bit Server VM 25.121-b13)
[13:52:50] [ERROR]: #!#!   OS: Windows 10 amd64 10.0
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Running CraftBukkit: false
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Current node: databases: (config.sk, line 168)
[13:52:50] [ERROR]: #!#! Current item: null
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Thread: Skript offline player resolver thread (fetches UUIDs from the minecraft servers)
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! End of Error.
[13:52:50] [WARN]:  #!#!
[13:52:50] [WARN]:  #!#! [Umbaska] List of plugins:
[13:52:50] [WARN]:  #!#! SkinsRestorer - 12.8.5, FastAsyncWorldEdit - 3.5.0-00c685c, Skript - 2.2-dev23, Essentials - TeamCity, MundoSK - 1.7.5-BETA.7.125, WildSkript - 1.8, PermissionsEx - 1.23.4, SQLibrary - 7.1, HGWorld - 1.0, SkQuery - 3.22.11, Vault - 1.5.6-b49, WolvSK - 1.5.2, Multiverse-Core - 2.4-b527, ProtocolLib - 4.2.0, Skellett - 1.7.9e, WorldEdit - 6.1.3-SNAPSHOT;3543-15d10be, skRayFall - 1.8, Umbaska - 2.0 Beta 5.5.1, WorldGuard - 6.1.2;e38d98d
[13:52:50] [WARN]:  #!#!
[13:52:50] [WARN]:  #!#! [Umbaska] List of addons:
[13:52:50] [WARN]:  #!#! Skellett v1.7.9eskRayFall v1.8Umbaska v2.0 Beta 5.5.1SkQuery v3.22.11MundoSK v1.7.5-BETA.7.125WildSkript v1.8WolvSK v1.5.2
[13:52:50] [WARN]:  #!#!
[13:52:50] [WARN]:  #!#!
[13:52:50] [WARN]:  #!#! [Umbaska] List of plugins:
[13:52:50] [WARN]:  #!#! SkinsRestorer - 12.8.5, FastAsyncWorldEdit - 3.5.0-00c685c, Skript - 2.2-dev23, Essentials - TeamCity, MundoSK - 1.7.5-BETA.7.125, WildSkript - 1.8, PermissionsEx - 1.23.4, SQLibrary - 7.1, HGWorld - 1.0, SkQuery - 3.22.11, Vault - 1.5.6-b49, WolvSK - 1.5.2, Multiverse-Core - 2.4-b527, ProtocolLib - 4.2.0, Skellett - 1.7.9e, WorldEdit - 6.1.3-SNAPSHOT;3543-15d10be, skRayFall - 1.8, Umbaska - 2.0 Beta 5.5.1, WorldGuard - 6.1.2;e38d98d
[13:52:50] [WARN]:  #!#!
[13:52:50] [WARN]:  #!#! [Umbaska] List of addons:
[13:52:50] [WARN]:  #!#! Skellett v1.7.9eskRayFall v1.8Umbaska v2.0 Beta 5.5.1SkQuery v3.22.11MundoSK v1.7.5-BETA.7.125WildSkript v1.8WolvSK v1.5.2
[13:52:50] [WARN]:  #!#!
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! [Skript] Severe Error:
[13:52:50] [ERROR]: #!#! Exception in thread Skript offline player resolver thread (fetches UUIDs from the minecraft servers)
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[13:52:50] [ERROR]: #!#! If you're a server admin however please go to https://github.com/bensku/Skript/issues/
[13:52:50] [ERROR]: #!#! and check whether this error has already been reported.
[13:52:50] [ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service),
[13:52:50] [ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[13:52:50] [ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[13:52:50] [ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Stack trace:
[13:52:50] [ERROR]: #!#! java.lang.NoClassDefFoundError: ch/njol/util/StringUtils
[13:52:50] [ERROR]: #!#!     at uk.co.umbaska.Main$6.publish(Main.java:301)
[13:52:50] [ERROR]: #!#!     at java.util.logging.Logger.log(Unknown Source)
[13:52:50] [ERROR]: #!#!     at java.util.logging.Logger.doLog(Unknown Source)
[13:52:50] [ERROR]: #!#!     at java.util.logging.Logger.log(Unknown Source)
[13:52:50] [ERROR]: #!#!     at java.util.logging.Logger.severe(Unknown Source)
[13:52:50] [ERROR]: #!#!     at ch.njol.skript.Skript.logEx(Skript.java:1245)
[13:52:50] [ERROR]: #!#!     at ch.njol.skript.Skript.exception(Skript.java:1239)
[13:52:50] [ERROR]: #!#!     at ch.njol.skript.Skript.exception(Skript.java:1176)
[13:52:50] [ERROR]: #!#!     at ch.njol.skript.bukkitutil.UnresolvedOfflinePlayer$1.run(UnresolvedOfflinePlayer.java:58)
[13:52:50] [ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Version Information:
[13:52:50] [ERROR]: #!#!   Skript: 2.2-dev23
[13:52:50] [ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
[13:52:50] [ERROR]: #!#!   Minecraft: 1.8.8
[13:52:50] [ERROR]: #!#!   Java: 1.8.0_121 (Java HotSpot(TM) 64-Bit Server VM 25.121-b13)
[13:52:50] [ERROR]: #!#!   OS: Windows 10 amd64 10.0
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Running CraftBukkit: false
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Current node: databases: (config.sk, line 168)
[13:52:50] [ERROR]: #!#! Current item: null
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! Thread: Skript offline player resolver thread (fetches UUIDs from the minecraft servers)
[13:52:50] [ERROR]: #!#!
[13:52:50] [ERROR]: #!#! End of Error.
[doublepost=1487089451,1487087908][/doublepost]Solved! After the server reload
 
Status
Not open for further replies.