Gość ZiemniaQ Opublikowano 17 maja 2019 Udostępnij Opublikowano 17 maja 2019 (edytowane) Opis: Skrypt automatycznie posegreguje podaną mu listę zmiennych w kolejności malejącej. Instalacja: Skrypt zapisujemy w nowym lub istniejącym już pliku tekstowym w końcówką .sk w folderze pluginu Skript, dla przykładu: /plugins/Skript/scripts/pyraTop.sk Następnie należy wyłączyć i włączyć serwer ponownie lub skorzystać z komendy /sk reload <nazwa_pliku> Po wykonaniu jednej z tych czynności skrypt będzie gotowy do użycia globalnie tj. funkcje i zmienne będą działać we wszystkich innych skryptach na serwerze. Korzystanie: Pierwszym warunkiem jaki należy spełnić jest posiadanie zmiennej w formacie {nazwa::nick_gracza}. W miejscu nazwy może się znajdować cokolwiek: wykopany_stone, zabojstwa, smierci , przepisNaZiemniakiZGrilla itp Gdy już posiadamy naszą zmienną, korzystamy z pierwszej funkcji, która wygeneruje nam naszą listę z topką: set {_lista::*} to createTop("nazwa", 5) gdzie: {_lista::*} to zmienna, do której zostanie zapisana topka pierwszym argumentem funkcji jest tekst zawierający nazwę naszej zmiennej drugim argumentem jest liczba, która oznacza ilość miejsc w topce jaka zostanie wygenerowana Powyższy sposób daje nam już gotową listę, którą możemy zapętlić i wyświetlić powiedzmy na chacie, jednak jest ona ograniczona do pewnego formatu: nick_gracz ---> wynik. Separator, który znajduje się pomiędzy graczem a jego wynikiem można dowolnie zmienić w drugiej linijce skryptu: set {symbol} to " ---> " Chcąc uzyskać dwie zmienne rozdzielone na graczy i ich wyniki należy skorzystać z drugiej funkcji: set {_gracze::*} to getTop("players", {_lista::*}) set {_wyniki::*} to getTop("wyniki", {_lista::*}) gdzie: {_gracze::*} i {_wyniki::*} to zmienne, które będą zawierały nicki graczy i ich wartości ułożone kolejno od największej do najmniejszej pierwszy argument funkcji zawiera tekst - 'players' zwróci nam listę graczy, zaś 'wyniki' listę wyników drugi argument funkcji to wygenerowana uprzednio topka Zastosowanie: Wygenerowane topki można umieszczać wszędzie i nie ma tu żadnego ograniczenia, mogą to być: listy na chacie, przedmioty w GUI, hologramy, tabliczki, lore, strony internetowe itp. Przykłady: Spoiler on mine: if {bloki::%player%} is set add 1 to {bloki::%player%} else set {bloki::%player%} to 1 command /topka [<integer=3>]: trigger: set {_top::*} to createTop("bloki", arg 1) set {_gracze::*} to getTop("players", {_top::*}) set {_wyniki::*} to getTop("wyniki", {_top::*}) send "&lNajlepsi górnicy:" loop arg 1 times: send "[%loop-number%.] &9%{_gracze::%loop-number%}%&f: &b%{_wyniki::%loop-number%}%" Skrypt wygeneruje top 3 (lub podaną w argumencie ilość) najlepszych górników, i wyświetli wszystko na chacie osobie która wywołała komendę. on chat: if {chat::%player%} is set: add (length of message) to {chat::%player%} else: set {chat::%player%} to (length of message) command /topka [<integer=10>]: trigger: set {_top::*} to createTop("chat", arg 1) set {_gracze::*} to getTop("players", {_top::*}) set {_wyniki::*} to getTop("wyniki", {_top::*}) open virtual chest inventory with (rounded up (arg 1 / 9)) rows named "Topka chatu" to player loop arg 1 times: format gui slot (loop-number - 1) of player with 1 of potato named "&6%{_gracze::%loop-number%}%&f: &e%{_wyniki::%loop-number%}%" Skrypt policzy ilość znaków w każdej wiadomości gracza, a następnie po wpisaniu komendy wygeneruje topkę i wyświetli ją graczowi w GUI (wymagane TuSKe) Wymagania: plugin Skript w wersji 2.2 lub wyższej silnik Spigot lub Paper w wersji 1.9 i wyższe Download: pyraTop v1.0 Edytowane 19 czerwca 2019 przez ZiemniaQ Ziemniaki Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/ Udostępnij na innych stronach Więcej opcji udostępniania...
jaku49 691 Opublikowano 17 maja 2019 Udostępnij Opublikowano 17 maja 2019 Pomysł dobry ale u mnie to standardowo nie działa Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-215362 Udostępnij na innych stronach Więcej opcji udostępniania...
Gość ZiemniaQ Opublikowano 17 maja 2019 Udostępnij Opublikowano 17 maja 2019 (edytowane) A coś więcej? Jakieś szczegóły? @jaku49 Edytowane 17 maja 2019 przez ZiemniaQ Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-215363 Udostępnij na innych stronach Więcej opcji udostępniania...
jaku49 691 Opublikowano 17 maja 2019 Udostępnij Opublikowano 17 maja 2019 (edytowane) Spoiler [22:54:12] [Server thread/INFO]: [Skript] Reloading tops.sk... [22:54:12] [Server thread/ERROR]: Can't understand this condition/effect: add 1 to {bloki::%player%}????? (tops.sk, line 33: add 1 to {bloki::%player%}?????') [22:54:12] [Server thread/ERROR]: Can't understand this condition/effect: send "[%loop-number%.] &9%{_gracze::%loop-number%}%&f: &b%{_wyniki::%loop-number%}%"???? to sender (tops.sk, line 41: send "[%loop-number%.] &9%{_gracze::%loop-number%}%&f: &b%{_wyniki::%loop-number%}%"???? to sender') [22:54:12] [Server thread/INFO]: [Skript] Encountered 2 errors while reloading tops.sk! [22:54:17] [User Authenticator #1/INFO]: UUID of player Kuba_2003TV is 901ee24f-4fda-3040-9c17-7dcee5626f1b [22:54:17] [Server thread/INFO]: Kuba_2003TV[/192.168.1.2:51846] logged in with entity id 39 at ([world]-214.69999998807907, 53.0, 92.75787550819123) [22:54:20] [Server thread/INFO]: Kuba_2003TV issued server command: /topka [22:54:20] [Server thread/INFO]: Kuba_2003TV [901ee24f-4fda-3040-9c17-7dcee5626f1b]: /topka [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! [Skript] Severe Error: [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Something went horribly wrong with Skript. [22:54:20] [Server thread/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either. [22:54:20] [Server thread/ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons). [22:54:20] [Server thread/ERROR]: #!#! Here is full list of them: [22:54:20] [Server thread/ERROR]: #!#! skRayFall (https://sk.rayfall.net/) SkVault Vixio (http://vixio.space) TuSKe (github.com/Tuke-Nuke/TuSKe) SK-NBeeT (https://github.com/ShaneBeee/Sk-NBeeT) skDragon skUtilities (https://tim740.github.io/) WildSkript (http://www.dzikoysk.net/) SkQuery Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/) MundoSK (https://forums.skunity.com/resources/mundosk.69/) SkUniversal [22:54:20] [Server thread/ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue. [22:54:20] [Server thread/ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it. [22:54:20] [Server thread/ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue. [22:54:20] [Server thread/ERROR]: #!#! In that case, you will be given instruction on how should you report it. [22:54:20] [Server thread/ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin. [22:54:20] [Server thread/ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker. [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Stack trace: [22:54:20] [Server thread/ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: 0 [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:265) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:1) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:278) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:278) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:298) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:255) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:254) [22:54:20] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:169) [22:54:20] [Server thread/ERROR]: #!#! at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:35) [22:54:20] [Server thread/ERROR]: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) [22:54:20] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [22:54:20] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1470) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1283) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) [22:54:20] [Server thread/ERROR]: #!#! at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [22:54:20] [Server thread/ERROR]: #!#! at java.util.concurrent.FutureTask.run(Unknown Source) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) [22:54:20] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) [22:54:20] [Server thread/ERROR]: #!#! at java.lang.Thread.run(Unknown Source) [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Version Information: [22:54:20] [Server thread/ERROR]: #!#! Skript: 2.3.6 (latest) [22:54:20] [Server thread/ERROR]: #!#! Flavor: skriptlang-github [22:54:20] [Server thread/ERROR]: #!#! Date: 2019-03-03 [22:54:20] [Server thread/ERROR]: #!#! Bukkit: 1.12.2-R0.1-SNAPSHOT [22:54:20] [Server thread/ERROR]: #!#! Minecraft: 1.12.2 [22:54:20] [Server thread/ERROR]: #!#! Java: 1.8.0_151 (Java HotSpot(TM) 64-Bit Server VM 25.151-b12) [22:54:20] [Server thread/ERROR]: #!#! OS: Windows 10 amd64 10.0 [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Server platform: Paper [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Current node: null [22:54:20] [Server thread/ERROR]: #!#! Current item: set {_max}(as java.lang.Object) to max({_top::*}(as java.lang.Number)) [22:54:20] [Server thread/ERROR]: #!#! Current trigger: function createTop (simple event) (tops.sk, line -1) [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Thread: Server thread [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! Language: english [22:54:20] [Server thread/ERROR]: #!#! Link parse mode: DISABLED [22:54:20] [Server thread/ERROR]: #!#! [22:54:20] [Server thread/ERROR]: #!#! End of Error. [22:54:20] [Server thread/ERROR]: #!#! W sumie to każdy skrypt do tego podobny (nie) działa tak samo. Skript - najnowszy. Edytowane 17 maja 2019 przez jaku49 spojler co by syfu nie robić na forum Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-215365 Udostępnij na innych stronach Więcej opcji udostępniania...
Gość ZiemniaQ Opublikowano 17 maja 2019 Udostępnij Opublikowano 17 maja 2019 Wykasuj sobie pytajniki, albo przepisz te dwie linijki ręcznie, bo czasem jak kopiujesz z forum to takie pozostałości w formie dziwnych symboli się przenoszą i wywala błędy: Can't understand this condition/effect: add 1 to {bloki::%player%}????? (tops.sk, line 33: add 1 to {bloki::%player%}?????') Prawdopodobnie to jest przyczyną - zmienna nie istnieje i ta funkcja max() wywala error bo zamiast listy w argumencie ma null Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-215366 Udostępnij na innych stronach Więcej opcji udostępniania...
xAxee 1968 Opublikowano 22 maja 2019 Udostępnij Opublikowano 22 maja 2019 U mnie wszystko działa Fajny przydatny dodatek (spigot 1.9 nie jest wymagany xD) Zamieniłbym tylko players i wyniki na np index i value lub coś takiego Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-215771 Udostępnij na innych stronach Więcej opcji udostępniania...
keszir 6 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 siemka Mam problem z skryptem, zadnych bledow nie wywala ale nie uzupelnia topki wyswietla sie <none> Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217159 Udostępnij na innych stronach Więcej opcji udostępniania...
Gość ZiemniaQ Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 Godzinę temu, keszir napisał: siemka Mam problem z skryptem, zadnych bledow nie wywala ale nie uzupelnia topki wyswietla sie <none> Kod by się przydał. Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217166 Udostępnij na innych stronach Więcej opcji udostępniania...
keszir 6 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 (edytowane) I tu sie pojawia problem xD Kod jest skopiowany z spoilera on load: set {symbol} to " ---> " function createTop(t: string, i: integer) :: strings: set {_offlinePlayers::*} to all offline players loop {_offlinePlayers::*}: if {%{_t}%::%loop-value%} is set: add {%{_t}%::%loop-value%} to {_top::*} add loop-value to {_players::*} loop {_i} times: set {_max} to max({_top::*}) loop {_top::*}: if loop-value-2 = {_max}: set {_index} to loop-index delete {_top::%{_index}%} add "%{_players::%{_index}%}%%{symbol}%%{_max}%" to {_return::*} delete {_players::%{_index}%} return {_return::*} function getTop(t: string, list: strings) :: strings: loop {_list::*}: set {_split::*} to loop-value split at {symbol} add {_split::1} to {_players::*} add {_split::2} to {_top::*} if {_t} = "players": return {_players::*} else: return {_top::*} #Created by: LuckyPotato v1.0 17.05.2019 on mine: add 1 to {bloki::%player%} command /topka [<integer=3>]: trigger: set {_top::*} to createTop("bloki", arg 1) set {_gracze::*} to getTop("players", {_top::*}) set {_wyniki::*} to getTop("wyniki", {_top::*}) send "&lNajlepsi górnicy:" loop arg 1 times: send "[%loop-number%.] &9%{_gracze::%loop-number%}%&f: &b%{_wyniki::%loop-number%}%" Edytowane 19 czerwca 2019 przez keszir Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217167 Udostępnij na innych stronach Więcej opcji udostępniania...
jaku49 691 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 Godzinę temu, keszir napisał: I tu sie pojawia problem xD Kod jest skopiowany z spoilera on load: set {symbol} to " ---> " function createTop(t: string, i: integer) :: strings: set {_offlinePlayers::*} to all offline players loop {_offlinePlayers::*}: if {%{_t}%::%loop-value%} is set: add {%{_t}%::%loop-value%} to {_top::*} add loop-value to {_players::*} loop {_i} times: set {_max} to max({_top::*}) loop {_top::*}: if loop-value-2 = {_max}: set {_index} to loop-index delete {_top::%{_index}%} add "%{_players::%{_index}%}%%{symbol}%%{_max}%" to {_return::*} delete {_players::%{_index}%} return {_return::*} function getTop(t: string, list: strings) :: strings: loop {_list::*}: set {_split::*} to loop-value split at {symbol} add {_split::1} to {_players::*} add {_split::2} to {_top::*} if {_t} = "players": return {_players::*} else: return {_top::*} #Created by: LuckyPotato v1.0 17.05.2019 on mine: add 1 to {bloki::%player%} command /topka [<integer=3>]: trigger: set {_top::*} to createTop("bloki", arg 1) set {_gracze::*} to getTop("players", {_top::*}) set {_wyniki::*} to getTop("wyniki", {_top::*}) send "&lNajlepsi górnicy:" loop arg 1 times: send "[%loop-number%.] &9%{_gracze::%loop-number%}%&f: &b%{_wyniki::%loop-number%}%" Tobie też wywala błąd gdy wpisujesz /topka? I nie wyświetla Ci żadnych nicków? Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217169 Udostępnij na innych stronach Więcej opcji udostępniania...
keszir 6 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 8 minut temu, jaku49 napisał: Tobie też wywala błąd gdy wpisujesz /topka? I nie wyświetla Ci żadnych nicków? Teraz ogarnalem, ze w konsoli wyskakuje blad. [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! [Skript] Severe Error: [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Something went horribly wrong with Skript. [16:06:08 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either. [16:06:08 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons). [16:06:08 ERROR]: #!#! Here is full list of them: [16:06:08 ERROR]: #!#! skRayFall (https://sk.rayfall.net/) skDragon skUtilities (https://tim740.github.io/) SkQuery [16:06:08 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue. [16:06:08 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it. [16:06:08 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue. [16:06:08 ERROR]: #!#! In that case, you will be given instruction on how should you report it. [16:06:08 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin. [16:06:08 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker. [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Stack trace: [16:06:08 ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: 0 [16:06:08 ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:265) [16:06:08 ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:1) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102) [16:06:08 ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:278) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102) [16:06:08 ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:278) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:292) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:251) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:252) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:169) [16:06:08 ERROR]: #!#! at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) [16:06:08 ERROR]: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) [16:06:08 ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) [16:06:08 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:536) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.handleCommand(PlayerConnection.java:1824) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1640) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:18) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:127) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:105) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.aW(MinecraftServer.java:998) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:991) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:115) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:975) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:908) [16:06:08 ERROR]: #!#! at java.lang.Thread.run(Unknown Source) [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Version Information: [16:06:08 ERROR]: #!#! Skript: 2.4-alpha3 (latest) [16:06:08 ERROR]: #!#! Flavor: skriptlang-github [16:06:08 ERROR]: #!#! Date: 2019-06-04 [16:06:08 ERROR]: #!#! Bukkit: 1.14.2-R0.1-SNAPSHOT [16:06:08 ERROR]: #!#! Minecraft: 1.14.2 [16:06:08 ERROR]: #!#! Java: 1.8.0_201 (Java HotSpot(TM) 64-Bit Server VM 25.201-b09) [16:06:08 ERROR]: #!#! OS: Windows 10 amd64 10.0 [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Server platform: Paper [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Current node: null [16:06:08 ERROR]: #!#! Current item: set {_max}(as java.lang.Object) to max({_top::*}(as java.lang.Number)) [16:06:08 ERROR]: #!#! Current trigger: function createTop (simple event) (drop.sk, line -1) [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Thread: Server thread [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Language: english [16:06:08 ERROR]: #!#! Link parse mode: DISABLED [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! End of Error. [16:06:08 ERROR]: #!#! Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217170 Udostępnij na innych stronach Więcej opcji udostępniania...
jaku49 691 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 Spoiler 11 minut temu, keszir napisał: Teraz ogarnalem, ze w konsoli wyskakuje blad. [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! [Skript] Severe Error: [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Something went horribly wrong with Skript. [16:06:08 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either. [16:06:08 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons). [16:06:08 ERROR]: #!#! Here is full list of them: [16:06:08 ERROR]: #!#! skRayFall (https://sk.rayfall.net/) skDragon skUtilities (https://tim740.github.io/) SkQuery [16:06:08 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue. [16:06:08 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it. [16:06:08 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue. [16:06:08 ERROR]: #!#! In that case, you will be given instruction on how should you report it. [16:06:08 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin. [16:06:08 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker. [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Stack trace: [16:06:08 ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: 0 [16:06:08 ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:265) [16:06:08 ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:1) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102) [16:06:08 ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:278) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:93) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:204) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102) [16:06:08 ERROR]: #!#! at ch.njol.skript.effects.EffChange.execute(EffChange.java:278) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89) [16:06:08 ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:292) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:251) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:252) [16:06:08 ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:169) [16:06:08 ERROR]: #!#! at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) [16:06:08 ERROR]: #!#! at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) [16:06:08 ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) [16:06:08 ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:536) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.handleCommand(PlayerConnection.java:1824) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1640) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:18) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:127) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:105) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.aW(MinecraftServer.java:998) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:991) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:115) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:975) [16:06:08 ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:908) [16:06:08 ERROR]: #!#! at java.lang.Thread.run(Unknown Source) [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Version Information: [16:06:08 ERROR]: #!#! Skript: 2.4-alpha3 (latest) [16:06:08 ERROR]: #!#! Flavor: skriptlang-github [16:06:08 ERROR]: #!#! Date: 2019-06-04 [16:06:08 ERROR]: #!#! Bukkit: 1.14.2-R0.1-SNAPSHOT [16:06:08 ERROR]: #!#! Minecraft: 1.14.2 [16:06:08 ERROR]: #!#! Java: 1.8.0_201 (Java HotSpot(TM) 64-Bit Server VM 25.201-b09) [16:06:08 ERROR]: #!#! OS: Windows 10 amd64 10.0 [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Server platform: Paper [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Current node: null [16:06:08 ERROR]: #!#! Current item: set {_max}(as java.lang.Object) to max({_top::*}(as java.lang.Number)) [16:06:08 ERROR]: #!#! Current trigger: function createTop (simple event) (drop.sk, line -1) [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Thread: Server thread [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! Language: english [16:06:08 ERROR]: #!#! Link parse mode: DISABLED [16:06:08 ERROR]: #!#! [16:06:08 ERROR]: #!#! End of Error. [16:06:08 ERROR]: #!#! Mam dokładnie to samo... Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217171 Udostępnij na innych stronach Więcej opcji udostępniania...
keszir 6 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 Teraz, jaku49 napisał: Ukryj zawartość Mam dokładnie to samo... Wersja skript ta sama? U mnie 2.4-alpha3 (latest) jaku49 1 Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217172 Udostępnij na innych stronach Więcej opcji udostępniania...
Gość ZiemniaQ Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 Błąd w przykładzie - punkty dodają się do zmiennej która nie istnieje, czyli funkcja dostaje nulla i wyrzuca błąd. Wystarczy zmienić trochę event np: on mine: if {bloki::%player%} is set add 1 to {bloki::%player%} else set {bloki::%player%} to 1 To powinno rozwiązać problem. Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217174 Udostępnij na innych stronach Więcej opcji udostępniania...
keszir 6 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 Dalej to samo jaku49 1 Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217175 Udostępnij na innych stronach Więcej opcji udostępniania...
jaku49 691 Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 33 minuty temu, keszir napisał: Dalej to samo Zmieniłem jedną linijkę która powodowała błąd i błędu nie ma. on load: set {symbol} to " ---> " function createTop(t: string, i: integer) :: strings: set {_offlinePlayers::*} to all offline players loop {_offlinePlayers::*}: if {%{_t}%::%loop-value%} is set: add {%{_t}%::%loop-value%} to {_top::*} add loop-value to {_players::*} loop {_i} times: set {_max} to size of {_top::*} #<---- to było zmienione loop {_top::*}: if loop-value-2 = {_max}: set {_index} to loop-index delete {_top::%{_index}%} add "%{_players::%{_index}%}%%{symbol}%%{_max}%" to {_return::*} delete {_players::%{_index}%} return {_return::*} function getTop(t: string, list: strings) :: strings: loop {_list::*}: set {_split::*} to loop-value split at {symbol} add {_split::1} to {_players::*} add {_split::2} to {_top::*} if {_t} = "players": return {_players::*} else: return {_top::*} #Created by: LuckyPotato v1.0 17.05.2019 To chyba rozwiązanie naszego wspólnego problemu. keszir 1 Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217177 Udostępnij na innych stronach Więcej opcji udostępniania...
Gość ZiemniaQ Opublikowano 19 czerwca 2019 Udostępnij Opublikowano 19 czerwca 2019 4 godziny temu, jaku49 napisał: Zmieniłem jedną linijkę która powodowała błąd i błędu nie ma. Spoiler To chyba rozwiązanie naszego wspólnego problemu. Otóż nie. To co zrobiłeś teraz może i powoduje że znikają errory, ale niestety topka sama w sobie działać nie będzie. Funkcją max() chciałem zaoszczędzić trochę kodu i ograniczyć zbędne pętle, skoro jednak nie działa wam ona jak należy (mimo że powinna) to poprawię kod i wstawię drugi bez niej. Ale to nie dzisiaj. Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217196 Udostępnij na innych stronach Więcej opcji udostępniania...
keszir 6 Opublikowano 21 czerwca 2019 Udostępnij Opublikowano 21 czerwca 2019 Kozak, bledu juz nie ma, ale dalej mi nie wyswietla tej topki ;/ Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217277 Udostępnij na innych stronach Więcej opcji udostępniania...
jaku49 691 Opublikowano 21 czerwca 2019 Udostępnij Opublikowano 21 czerwca 2019 1 godzinę temu, keszir napisał: Kozak, bledu juz nie ma, ale dalej mi nie wyswietla tej topki ;/ Musimy czekać aż autor naprawi ten błąd. Na 1.14 ten problem nie występuje. Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-217288 Udostępnij na innych stronach Więcej opcji udostępniania...
SpokocukierkiPL 2 Opublikowano 27 lipca 2020 Udostępnij Opublikowano 27 lipca 2020 mam błąd [15:17:50 INFO]: [Skript] Reloading topka.sk... [15:17:50 ERROR]: A function named 'createTop' already exists in script 'AxJobs.sk' (topka.sk, line 4: function createTop(t: string, i: integer) :: strings:') [15:17:50 INFO]: [Skript] Encountered 1 error while reloading topka.sk! Cytuj Odnośnik do komentarza https://skript.pl/temat/33308-pyratop-skrypt-na-tworzenie-topki/#findComment-253789 Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Dołącz do dyskusji
Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.