Skocz do zawartości
  • 0

zmienianie zmiennej na argument


ziemniaczek320

Pytanie

Otóż mam taki problem:

Zachciało mi się robić skrypt na statystyki gracza no i wszystko fajnie do póki nie zachciało mi się robić możliwości sprawdzania czyichś statystyk przez administratora. Głowiłem się i głowiłem aż w końcu wymyśliłem coś takiego:

command /at [<text&gt] [<player&gt]:	trigger:[200 linijek pozniej(powaznie 200 XD)]		if player have permissions "postac.czyjas":			if arg 1 is "nalezacado":				if arg 2 is set:					set {postac.adm.%player%} to "%argument 2%"					show "{@apdkopacz};{@apddrwal};{@apdzabojca};{@apdfarmer};{@apdrzemieslnik};{@formatuj};{@aodswiezadm}" with 2 rows named "&6&o&l        POSTAC %argument 2%" to player				if arg 2 is not set:					send "&b&l&opoprawne uzycie &5&l&o/at nalezacado [nick]" to player 

no i działa... ale tylko jeżeli gracz nie ma w nicku cyferek :( . Więc właśnie w tym problem. Jak zrobić żeby admin mógł zobaczyć statystyki gracza który ma nick z cyferkami? Proszę pomożcie

Edytowane przez ziemniaczek320
Odnośnik do komentarza
Udostępnij na innych stronach

16 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

sprawdzę to na kimś jak tylko będę mógł, ale jak sprawdzam na sobie to nie działa... Nadal wyskakuje:

"An internal error occurred while attempting to perform this command"

i powoli się zaczynam zastanawiać czy zmienne mogą przechowywać jednocześnie tekst i liczbę jednocześnie...

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
command /at [<text&gt] [<text&gt]:	trigger:[200 linijek pozniej(powaznie 200 XD)]		if player have permissions "postac.czyjas":			if arg 1 is "nalezacado":				if arg 2 is set:					set {postac.adm.%player%} to arg 2 parsed as player					show "{@apdkopacz};{@apddrwal};{@apdzabojca};{@apdfarmer};{@apdrzemieslnik};{@formatuj};{@aodswiezadm}" with 2 rows named "&6&o&l        POSTAC %arg 2 parsed as player%" to player				if arg 2 is not set:					send "&b&l&opoprawne uzycie &5&l&o/at nalezacado [nick]" to player 
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

silnik bukkit 1.7.2 R.O.3

skript 2.1.2

skript+

SkAddonLib

błędy:

[18:13:30] [Server thread/ERROR]: [Skript] '2 parsed as player' is not a type (postac beta 1.0.sk, line 281: set {postac.adm.%player%} to arg 2 parsed as player')[18:13:31] [Server thread/ERROR]: [Skript] '"s;1;i;278;n;&9&o&l&nKOPANIE;l;&2&lpokazuje statystyki kopania;c;pkz %name of player% pk akopacz;s;3;i;279;n;&9&o&l&nSCINANIE DRZEW;l;&2&lpokazuje statystyki scinania drewna;c;pkz %name of player% pk adrwal;s;5;i;276;n;&9&o&l&nZABOJSTWA;l;&2&lpokazuje statystyki zabojstw;c;pkz %name of player% pk azabojca;s;7;i;293;n;&9&o&l&nFARMERSTWO;l;&2&lpokazuje statystyki farmerstwa;c;pkz %name of player% pk afarmer;s;9;i;58;n;&9&o&l&nRZEMIESLNICTWO;l;&2&lpokazuje statystyki rzemieslnictwa;c;pkz %name of player% pk arzemieslnik;s;10;i;51;n;&6&l&o&nFORMATOWANIE STATYSTYK %{postac.adm.%player%}%;l;&6Zeruje &nwszystkie &r&6statystyki nalezace do %{postac.adm.%player%}%;c;pkz %name of player% pk formatuj;s;18;i;124;n;&5&l&oODSWIEZ;l;&d&o&lodswieza statystyki||&6&o&l&n%{postac.adm.%player%}% &r&d&o&ldotyczace||&d&o&lklasy i wymaganych||&d&o&lpunktów;c;pkz %name of player% pk odswiezr" with 2 rows named "&6&o&l        POSTAC %arg 2 parsed as player%"' is not an entity type (postac beta 1.0.sk, line 282: show "{@apdkopacz};{@apddrwal};{@apdzabojca};{@apdfarmer};{@apdrzemieslnik};{@formatuj};{@aodswiezadm}" with 2 rows named "&6&o&l        POSTAC %arg 2 parsed as player%" to player')
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
command /at [<text&gt] [<text&gt]:	trigger:[200 linijek pozniej(powaznie 200 XD)]		if player have permissions "postac.czyjas":			if arg 1 is "nalezacado":				if arg 2 is set:					set {postac.adm.%player%} to player-argument					show "s;1;i;dirt;n;{@apdkopacz};s;2;i;oak log;n;{@apddrwal};s;3;i;iron sword;n;{@apdzabojca};s;4;i;diamond hoe;n;{@apdfarmer};s;5;i;crafting table;n;{@apdrzemieslnik};s;6;i;diamond pickaxe;n;{@formatuj};s;7;i;grass;n;{@aodswiezadm}" with 2 rows named "&6&o&l	    POSTAC %player-argument%" to player				if arg 2 is not set:					send "&b&l&opoprawne uzycie &5&l&o/at nalezacado [nick]" to player

Wszystko jasne...

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

wywala 2 błędy:

[19:07:22] [Server thread/ERROR]: [Skript] There is no player argument in this command (postac beta 1.0.sk, line 281: set {postac.adm.%player%} to player-argument')[19:07:22] [Server thread/ERROR]: [Skript] '"s;1;i;dirt;n;s;1;i;278;n;&9&o&l&nKOPANIE;l;&2&lpokazuje statystyki kopania;c;pkz %name of player% pk akopacz;s;2;i;oak log;n;s;3;i;279;n;&9&o&l&nSCINANIE DRZEW;l;&2&lpokazuje statystyki scinania drewna;c;pkz %name of player% pk adrwal;s;3;i;iron sword;n;s;5;i;276;n;&9&o&l&nZABOJSTWA;l;&2&lpokazuje statystyki zabojstw;c;pkz %name of player% pk azabojca;s;4;i;diamond hoe;n;s;7;i;293;n;&9&o&l&nFARMERSTWO;l;&2&lpokazuje statystyki farmerstwa;c;pkz %name of player% pk afarmer;s;5;i;crafting table;n;s;9;i;58;n;&9&o&l&nRZEMIESLNICTWO;l;&2&lpokazuje statystyki rzemieslnictwa;c;pkz %name of player% pk arzemieslnik;s;6;i;diamond pickaxe;n;s;10;i;51;n;&6&l&o&nFORMATOWANIE STATYSTYK %{postac.adm.%player%}%;l;&6Zeruje &nwszystkie &r&6statystyki nalezace do %{postac.adm.%player%}%;c;pkz %name of player% pk formatuj;s;7;i;grass;n;s;18;i;124;n;&5&l&oODSWIEZ;l;&d&o&lodswieza statystyki||&6&o&l&n%{postac.adm.%player%}% &r&d&o&ldotyczace||&d&o&lklasy i wymaganych||&d&o&lpunktów;c;pkz %name of player% pk odswiezr" with 2 rows named "&6&o&l        POSTAC %player-argument%"' is not an entity type (postac beta 1.0.sk, line 282: show "s;1;i;dirt;n;{@apdkopacz};s;2;i;oak log;n;{@apddrwal};s;3;i;iron sword;n;{@apdzabojca};s;4;i;diamond hoe;n;{@apdfarmer};s;5;i;crafting table;n;{@apdrzemieslnik};s;6;i;diamond pickaxe;n;{@formatuj};s;7;i;grass;n;{@aodswiezadm}" with 2 rows named "&6&o&l        POSTAC %player-argument%" to player')

a po zmienieniu:

command /at [<text&gt] [<text&gt]:

na:

command /at [<text&gt] [<player&gt]:

nie wywala żadnych ale po wpisaniu komendy na chacie wyskakuje taki "an internal bla bla bla"

a w konsoli:

[19:09:34] [Server thread/INFO]: ziemniaczek320: /at nalezacado ziemniaczek320[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! [Skript] Severe Error:[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.[19:09:34] [Server thread/ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/[19:09:34] [Server thread/ERROR]: #!#! and check whether this error has already been reported.[19:09:34] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,[19:09:34] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.[19:09:34] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.[19:09:34] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! Stack trace:[19:09:34] [Server thread/ERROR]: #!#! java.lang.IllegalArgumentException: Title cannot be longer than 32 characters[19:09:34] [Server thread/ERROR]: #!#!     at org.apache.commons.lang.Validate.isTrue(Validate.java:157)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryCustom$MinecraftInventory.<init>(CraftInventoryCustom.java:48)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryCustom.<init>(CraftInventoryCustom.java:26)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_7_R1.CraftServer.createInventory(CraftServer.java:1472)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.Bukkit.createInventory(Bukkit.java:588)[19:09:34] [Server thread/ERROR]: #!#!     at com.w00tmast3r.skriptaddon.skriptplus.elements.virtualchests.EffVirtualChestSynthesizer.execute(EffVirtualChestSynthesizer.java:43)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:50)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:220)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:1)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.util.Task.callSync(Task.java:139)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:193)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:260)[19:09:34] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:155)[19:09:34] [Server thread/ERROR]: #!#!     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[19:09:34] [Server thread/ERROR]: #!#!     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[19:09:34] [Server thread/ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[19:09:34] [Server thread/ERROR]: #!#!     at java.lang.reflect.Method.invoke(Unknown Source)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:318)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:486)[19:09:34] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:471)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:944)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457)[19:09:34] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! Version Information:[19:09:34] [Server thread/ERROR]: #!#!   Skript: 2.1.2[19:09:34] [Server thread/ERROR]: #!#!   Bukkit: 1.7.2-R0.3[19:09:34] [Server thread/ERROR]: #!#!   Minecraft: 1.7.2[19:09:34] [Server thread/ERROR]: #!#!   Java: 1.7.0_51[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! Running CraftBukkit: false[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! Current node: null[19:09:34] [Server thread/ERROR]: #!#! Current item: EffVirtualChestSynthesizer[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! Thread: Server thread[19:09:34] [Server thread/ERROR]: #!#! [19:09:34] [Server thread/ERROR]: #!#! End of Error.[19:09:34] [Server thread/ERROR]: #!#! 

więc jednak niezbyt jasne...

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...