Skocz do zawartości
  • 0

Błąd w logach


Pytanie

Witam, otóż posiadam taki skrypt:
 

command /test:
	trigger:
		set block at location of player to chest
		set {skrzynka1} to block at location of player
		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot
		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot
		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot
		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot
		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot
			

Czasami w logach wyświetla mi się takowy błąd:
 

Spoiler

[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! [Skript] Severe Error:
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[22:46:51] [Server thread/ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/
[22:46:51] [Server thread/ERROR]: #!#! and check whether this error has already been reported.
[22:46:51] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
[22:46:51] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[22:46:51] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[22:46:51] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! Stack trace:
[22:46:51] [Server thread/ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: 27
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.TileEntityChest.getItem(TileEntityChest.java:58)
[22:46:51] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventory.getItem(CraftInventory.java:47)
[22:46:51] [Server thread/ERROR]: #!#!     at com.w00tmast3r.skquery.elements.expressions.ExprItemInInventory$1.getItem(ExprItemInInventory.java:33)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.classes.data.DefaultConverters$17.convert(DefaultConverters.java:234)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.classes.data.DefaultConverters$17.convert(DefaultConverters.java:1)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.registrations.Comparators$ConvertedComparator.compare(Comparators.java:182)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.conditions.CondCompare$1$1.check(CondCompare.java:246)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:172)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleLiteral.check(SimpleLiteral.java:176)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.conditions.CondCompare$1.check(CondCompare.java:242)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:172)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:160)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:155)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.conditions.CondCompare.check(CondCompare.java:239)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Condition.run(Condition.java:58)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Conditional.walk(Conditional.java:51)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:220)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:1)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.util.Task.callSync(Task.java:139)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:193)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:260)
[22:46:51] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:155)
[22:46:51] [Server thread/ERROR]: #!#!     at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
[22:46:51] [Server thread/ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:46:51] [Server thread/ERROR]: #!#!     at java.lang.reflect.Method.invoke(Method.java:497)
[22:46:51] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
[22:46:51] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[22:46:51] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[22:46:51] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1154)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[22:46:51] [Server thread/ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[22:46:51] [Server thread/ERROR]: #!#!     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
[22:46:51] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
[22:46:51] [Server thread/ERROR]: #!#!     at java.lang.Thread.run(Thread.java:745)
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! Version Information:
[22:46:51] [Server thread/ERROR]: #!#!   Skript: 2.1.2
[22:46:51] [Server thread/ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
[22:46:51] [Server thread/ERROR]: #!#!   Minecraft: 1.8.8
[22:46:51] [Server thread/ERROR]: #!#!   Java: 1.8.0_66
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! Running CraftBukkit: false
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! Current node: null
[22:46:51] [Server thread/ERROR]: #!#! Current item: slot is equal to [[itemtype:air]] (comparator: ConvertedComparator(ch.njol.skript.classes.data.DefaultConverters$17@150c2af8,ch.njol.skript.classes.data.DefaultComparators$2@75d47fe0,null))
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! Thread: Server thread
[22:46:51] [Server thread/ERROR]: #!#! 
[22:46:51] [Server thread/ERROR]: #!#! End of Error.
[22:46:51] [Server thread/ERROR]: #!#! 

Wydaje mi się, że to przez to iż jeden przedmiot nakłada się na drugi, ale przecież to zabezpieczyłem. Ktoś ma jakieś sugestię?

Odnośnik do komentarza
https://skript.pl/temat/28246-b%C5%82%C4%85d-w-logach/
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
Cytat

java.lang.ArrayIndexOutOfBoundsException: 27

To jest błąd, że chcesz do skrzynki, która ma 27 slotów, numerycznie (0-26), ustawić slot 27, którego nie ma :D 

		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot

pogrubiłem co jest źle.

powinno być between 0 and 26

 

Odnośnik do komentarza
https://skript.pl/temat/28246-b%C5%82%C4%85d-w-logach/#findComment-187097
Udostępnij na innych stronach

  • 0
19 godzin temu, knugi napisał:

To jest błąd, że chcesz do skrzynki, która ma 27 slotów, numerycznie (0-26), ustawić slot 27, którego nie ma :D 


		chance of 50%:
			set {_x} to random integer between 0 and 27
			if slot {_x} of block at {skrzynka1} is air:
				set {_x2} to random integer between 2 and 6
				set slot {_x} of block at {skrzynka1} to {_x2} of iron ingot

pogrubiłem co jest źle.

powinno być between 0 and 26

 

To fakt, kompletnie o tym nie pomyślałem. Dzięki wielkie - do zamknięcia!

Odnośnik do komentarza
https://skript.pl/temat/28246-b%C5%82%C4%85d-w-logach/#findComment-187144
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ę...