Witam
Mam problem z komendą /top10 otóż ostatnio chciałem sprawdzić kto prowadzi w evencie i skrypt przestał działać.
Zrobiłem /sk reload all i wszystko OK zero błędów. Stwierdziłem, że zrobię update, bo nie ukrywam miałem stare troszkę pluginy.
Jak pomyślałem tak zrobiłem. Problem nadal występował i występuje, jednak teraz pokazuje się to:
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! [Skript] Severe Error:
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[22:45:18] [Server thread/ERROR]: #!#! If you're a server admin however please go to https://github.com/bensku/Skript/issues/
[22:45:18] [Server thread/ERROR]: #!#! and check whether this error has already been reported.
[22:45:18] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service),
[22:45:18] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[22:45:18] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[22:45:18] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! Stack trace:
[22:45:18] [Server thread/ERROR]: #!#! java.lang.NullPointerException
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Variable.setIndex(Variable.java:377)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Variable.change(Variable.java:456)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:273)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:54)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:65)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:93)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:222)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:184)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:270)
[22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands$1.onServerCommand(Commands.java:181)
[22:45:18] [Server thread/ERROR]: #!#! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:45:18] [Server thread/ERROR]: #!#! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[22:45:18] [Server thread/ERROR]: #!#! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:45:18] [Server thread/ERROR]: #!#! at java.lang.reflect.Method.invoke(Method.java:498)
[22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
[22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:432)
[22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400)
[22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675)
[22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574)
[22:45:18] [Server thread/ERROR]: #!#! at java.lang.Thread.run(Thread.java:745)
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! Version Information:
[22:45:18] [Server thread/ERROR]: #!#! Skript: 2.2-dev23
[22:45:18] [Server thread/ERROR]: #!#! Bukkit: 1.11.2-R0.1-SNAPSHOT
[22:45:18] [Server thread/ERROR]: #!#! Minecraft: 1.11.2
[22:45:18] [Server thread/ERROR]: #!#! Java: 1.8.0_111 (Java HotSpot(TM) 64-Bit Server VM 25.111-b14)
[22:45:18] [Server thread/ERROR]: #!#! OS: Linux amd64 3.2.0-4-amd64
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! Running CraftBukkit: false
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! Current node: null
[22:45:18] [Server thread/ERROR]: #!#! Current item: remove {_v.%loop-number%}(as java.lang.Object) from {licznik::*}(as java.lang.Object)
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! Thread: Server thread
[22:45:18] [Server thread/ERROR]: #!#!
[22:45:18] [Server thread/ERROR]: #!#! End of Error.
[22:45:18] [Server thread/ERROR]: #!#!
MÓJ SKRYPT NIBY OK, ALE "Z DUPY" PRZESTAŁ DZIAŁAĆ:
#Event By Magnum
#Ver 1.0
variables:
{licznik::%player%} = 0
on join:
if {licznik::%player%} is not set:
set {licznik::%player%} to 0
command /top10:
permission: skript.topevent
permission message: &6NIE MASZ UPRAWNIEN ! &5<3
description: Top 10 graczy z najwyzsza iloscia punktow
trigger:
send "&c| &6------------------------------- &c|"
send "&c| &dTOP 10 NAJLEPSZYCH GRACZY EVENTU: &c|"
send "&c| &6------------------------------- &c|"
set {_num} to size of {licznik::*}
loop {_num} times:
loop {licznik::*}:
{_v.%loop-number%} is not set:
set {_v.%loop-number%} to loop-value-2
set {_naz.%loop-number%} to loop-index
loop-value-2 is greater than {_v.%loop-number%}:
set {_v.%loop-number%} to loop-value-2
set {_naz.%loop-number%} to loop-index
remove {_v.%loop-number%} from {licznik::*}
loop {_num} times:
if loop-number is less than or equal to 10:
send " &b%loop-number%. &a%{_naz.%loop-number%}% &8(&6&o%{_v.%loop-number%}%&8) "
set {licznik::%{_naz.%loop-number%}%} to {_v.%loop-number%}
send "&c| &6------------------------------- &c|"
Gdy usunę: "remove {_v.%loop-number%} from {licznik::*} " skrypt działa jednak jest na 10. pozycjach jedna osoba (ten sam nick).
Wiem, że błąd tkwi w "remove {_v.%loop-number%} from {licznik::*}" , ale zamiana remove na delete wywala błąd.
Tak więc nie wiem co jest nie tak , ale pomyślałem że przekroczyłem jakąś liczbę i nie potrafi tego przetrawić.
Pytanie
Bartusiak 0
Witam
Mam problem z komendą /top10 otóż ostatnio chciałem sprawdzić kto prowadzi w evencie i skrypt przestał działać.
Zrobiłem /sk reload all i wszystko OK zero błędów. Stwierdziłem, że zrobię update, bo nie ukrywam miałem stare troszkę pluginy.
Jak pomyślałem tak zrobiłem. Problem nadal występował i występuje, jednak teraz pokazuje się to:
[22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! [Skript] Severe Error: [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong. [22:45:18] [Server thread/ERROR]: #!#! If you're a server admin however please go to https://github.com/bensku/Skript/issues/ [22:45:18] [Server thread/ERROR]: #!#! and check whether this error has already been reported. [22:45:18] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service), [22:45:18] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error. [22:45:18] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well. [22:45:18] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast. [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! Stack trace: [22:45:18] [Server thread/ERROR]: #!#! java.lang.NullPointerException [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Variable.setIndex(Variable.java:377) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Variable.change(Variable.java:456) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:273) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:54) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:65) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:93) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:53) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:222) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:184) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:270) [22:45:18] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands$1.onServerCommand(Commands.java:181) [22:45:18] [Server thread/ERROR]: #!#! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [22:45:18] [Server thread/ERROR]: #!#! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [22:45:18] [Server thread/ERROR]: #!#! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [22:45:18] [Server thread/ERROR]: #!#! at java.lang.reflect.Method.invoke(Method.java:498) [22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) [22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [22:45:18] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:432) [22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400) [22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [22:45:18] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [22:45:18] [Server thread/ERROR]: #!#! at java.lang.Thread.run(Thread.java:745) [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! Version Information: [22:45:18] [Server thread/ERROR]: #!#! Skript: 2.2-dev23 [22:45:18] [Server thread/ERROR]: #!#! Bukkit: 1.11.2-R0.1-SNAPSHOT [22:45:18] [Server thread/ERROR]: #!#! Minecraft: 1.11.2 [22:45:18] [Server thread/ERROR]: #!#! Java: 1.8.0_111 (Java HotSpot(TM) 64-Bit Server VM 25.111-b14) [22:45:18] [Server thread/ERROR]: #!#! OS: Linux amd64 3.2.0-4-amd64 [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! Running CraftBukkit: false [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! Current node: null [22:45:18] [Server thread/ERROR]: #!#! Current item: remove {_v.%loop-number%}(as java.lang.Object) from {licznik::*}(as java.lang.Object) [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! Thread: Server thread [22:45:18] [Server thread/ERROR]: #!#! [22:45:18] [Server thread/ERROR]: #!#! End of Error. [22:45:18] [Server thread/ERROR]: #!#!
MÓJ SKRYPT NIBY OK, ALE "Z DUPY" PRZESTAŁ DZIAŁAĆ:
#Event By Magnum #Ver 1.0 variables: {licznik::%player%} = 0 on join: if {licznik::%player%} is not set: set {licznik::%player%} to 0 command /top10: permission: skript.topevent permission message: &6NIE MASZ UPRAWNIEN ! &5<3 description: Top 10 graczy z najwyzsza iloscia punktow trigger: send "&c| &6------------------------------- &c|" send "&c| &dTOP 10 NAJLEPSZYCH GRACZY EVENTU: &c|" send "&c| &6------------------------------- &c|" set {_num} to size of {licznik::*} loop {_num} times: loop {licznik::*}: {_v.%loop-number%} is not set: set {_v.%loop-number%} to loop-value-2 set {_naz.%loop-number%} to loop-index loop-value-2 is greater than {_v.%loop-number%}: set {_v.%loop-number%} to loop-value-2 set {_naz.%loop-number%} to loop-index remove {_v.%loop-number%} from {licznik::*} loop {_num} times: if loop-number is less than or equal to 10: send " &b%loop-number%. &a%{_naz.%loop-number%}% &8(&6&o%{_v.%loop-number%}%&8) " set {licznik::%{_naz.%loop-number%}%} to {_v.%loop-number%} send "&c| &6------------------------------- &c|"
Gdy usunę: "remove {_v.%loop-number%} from {licznik::*} " skrypt działa jednak jest na 10. pozycjach jedna osoba (ten sam nick).
Wiem, że błąd tkwi w "remove {_v.%loop-number%} from {licznik::*}" , ale zamiana remove na delete wywala błąd.
Tak więc nie wiem co jest nie tak , ale pomyślałem że przekroczyłem jakąś liczbę i nie potrafi tego przetrawić.
Pozdrawiam i liczę na pomoc,
Bartusiak/Magnum
Odnośnik do komentarza
Udostępnij na innych stronach
7 odpowiedzi na to pytanie
Rekomendowane odpowiedzi