Server error

  • 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 community!

    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.

Itqly_

Member
Sep 20, 2018
29
1
0
Hey, I was creating an Afk skript, when after reloading it and joining back (It starts when "on join") the server crashed, happens all the times I try to enter.

This is the error I get on console before it crashes
Java:
[10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! [Skript] Severe Error: [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong. [10:36:10 ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/ [10:36:10 ERROR]: #!#! and check whether this error has already been reported. [10:36:10 ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it, [10:36:10 ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error. [10:36:10 ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well. [10:36:10 ERROR]: #!#! By following this guide fixing the error should be easy and done fast. [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! Stack trace: [10:36:10 ERROR]: #!#! java.lang.NullPointerException [10:36:10 ERROR]: #!#!     at net.rayfall.eyesniper2.skrayfall.scoreboard.EffSetScore.execute(EffSetScore.java:63) [10:36:10 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:50) [10:36:10 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63) [10:36:10 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91) [10:36:10 ERROR]: #!#!     at ch.njol.skript.effects.Delay$1.run(Delay.java:85) [10:36:10 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71) [10:36:10 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [10:36:10 ERROR]: #!#!     at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:709) [10:36:10 ERROR]: #!#!     at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [10:36:10 ERROR]: #!#!     at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634) [10:36:10 ERROR]: #!#!     at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537) [10:36:10 ERROR]: #!#!     at java.lang.Thread.run(Thread.java:748) [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! Version Information: [10:36:10 ERROR]: #!#!   Skript: 2.1.2 [10:36:10 ERROR]: #!#!   Bukkit: 1.8-R0.1-SNAPSHOT [10:36:10 ERROR]: #!#!   Minecraft: 1.8 [10:36:10 ERROR]: #!#!   Java: 1.8.0_172 [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! Running CraftBukkit: false [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! Current node: null [10:36:10 ERROR]: #!#! Current item: null [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! Thread: Server thread [10:36:10 ERROR]: #!#! [10:36:10 ERROR]: #!#! End of Error. [10:36:10 ERROR]: #!#!

and this is the Afk skript that I created, that is I disable the server doesn't crash there should be a BIG error tho i didnt find it...

code_language.skript:
on any movement:
    set {movelast.%player%} to now
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on quit:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on respawn:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on death:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on break:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"
on join:
    while player is online:
        if {afk.%player%} is "false":
            if {movelast.%player%} > 2 minutes:
                set {afk.%player%} to "true"
                send "&7* &4%player% &7is AFK" to all players
                create holo object "&7- &4&lAfk &7-" with id "%player%.afk" at location 3 meters above player
command /afk [<offlineplayer>]:
    permission: command.afk
    trigger:
        if {afk.%player%} is "true":
            send "&7* &4%player% &7is no longer AFK"
            set {afk.%player%} to "false"
            delete holo object "%player%.afk"
            stop
        else:
            if arg 1 is not set:
                set {afk.%player%} to "true"
                send "&7* &4%player% &7is AFK" to all players
                create holo object "&7- &4&lAfk &7-" with id "%player%.afk" at location 3 meters above player
                stop
            else if arg 1 is set:
                if player has permission "command.afk.others":
                    if arg 1 is online:
                        set {afk.%arg 1%} to true
                        send "&7* &4%player% &7is AFK" to all players
                        create holo object "&7- &4&lAFK &7-" with id "%arg 1%.afk" at location 3 meters above arg 1
 
You should add a delay in the while loop in your join event
 
still not working:

code_language.skript:
on any movement:
    set {movelast.%player%} to now
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on quit:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on respawn:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on death:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"

on break:
    if {afk.%player%} is "true":
        set {afk.%player%} to "false"
        send "&7* &4%player% &7is no longer AFK" to all players
        delete holo object "%player%.afk"
on join:
    wait 1 tick
    while player is online:
        wait 1 tick
        if {afk.%player%} is "false":
            wait 1 tick
            if {movelast.%player%} > 2 minutes:
                wait 1 tick
                set {afk.%player%} to "true"
                send "&7* &4%player% &7is AFK" to all players
                create holo object "&7- &4&lAfk &7-" with id "%player%.afk" at location 3 meters above player
command /afk [<offlineplayer>]:
    permission: command.afk
    trigger:
        if {afk.%player%} is "true":
            send "&7* &4%player% &7is no longer AFK"
            set {afk.%player%} to "false"
            delete holo object "%player%.afk"
            stop
        else:
            if arg 1 is not set:
                set {afk.%player%} to "true"
                send "&7* &4%player% &7is AFK" to all players
                create holo object "&7- &4&lAfk &7-" with id "%player%.afk" at location 3 meters above player
                stop
            else if arg 1 is set:
                if player has permission "command.afk.others":
                    if arg 1 is online:
                        set {afk.%arg 1%} to true
                        send "&7* &4%player% &7is AFK" to all players
                        create holo object "&7- &4&lAFK &7-" with id "%arg 1%.afk" at location 3 meters above arg 1
 
Does it still error? If so, send the errors (not all in one line)
 
Never mind I created a timer in another method, Tho thank you for your help ! have a great day
[doublepost=1542976240,1542976201][/doublepost]If only I knew how to close the thread
 
Status
Not open for further replies.