Functions don't work properly #2384
Labels
bug
An issue that needs to be fixed. Alternatively, a PR fixing an issue.
completed
The issue has been fully resolved and the change will be in the next Skript update.
priority: medium
Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Description
I got an error when I use the function "max".
Steps to Reproduce
command /test: trigger: delete {test::*} add "test", "test2" and "test3" to {test::*} message "%max({test::*})%" to the executor stop
Expected Behavior
Just the function :)
Errors / Screenshots
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! [Skript] Severe Error:
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Something went horribly wrong with Skript.
[17:41:00] [Server thread/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[17:41:00] [Server thread/ERROR]: #!#! You should report it at https://github.com/SkriptLang/Skript/issues. Please copy paste this report there (or use paste service).
[17:41:00] [Server thread/ERROR]: #!#! This ensures that your issue is noticed and will be fixed as soon as possible.
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Stack trace:
[17:41:00] [Server thread/ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: 0
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:265)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.classes.data.DefaultFunctions$20.execute(DefaultFunctions.java:1)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.Function.execute(Function.java:119)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:217)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:44)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.VariableString.getMessageComponents(VariableString.java:584)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.effects.EffMessage.execute(EffMessage.java:89)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:57)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:292)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:251)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands.handleCommand(Commands.java:252)
[17:41:00] [Server thread/ERROR]: #!#! at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:169)
[17:41:00] [Server thread/ERROR]: #!#! at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
[17:41:00] [Server thread/ERROR]: #!#! at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[17:41:00] [Server thread/ERROR]: #!#! at java.lang.reflect.Method.invoke(Unknown Source)
[17:41:00] [Server thread/ERROR]: #!#! at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
[17:41:00] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[17:41:00] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529)
[17:41:00] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.handleCommand(PlayerConnection.java:1633)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1481)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:47)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:144)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:118)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:910)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:903)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeAll(SourceFile:103)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:886)
[17:41:00] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:820)
[17:41:00] [Server thread/ERROR]: #!#! at java.lang.Thread.run(Unknown Source)
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Version Information:
[17:41:00] [Server thread/ERROR]: #!#! Skript: 2.4-beta5 (latest)
[17:41:00] [Server thread/ERROR]: #!#! Flavor: skriptlang-github
[17:41:00] [Server thread/ERROR]: #!#! Date: 2019-08-04
[17:41:00] [Server thread/ERROR]: #!#! Bukkit: 1.14.4-R0.1-SNAPSHOT
[17:41:00] [Server thread/ERROR]: #!#! Minecraft: 1.14.4
[17:41:00] [Server thread/ERROR]: #!#! Java: 1.8.0_221 (Java HotSpot(TM) 64-Bit Server VM 25.221-b11)
[17:41:00] [Server thread/ERROR]: #!#! OS: Windows 10 amd64 10.0
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Server platform: Spigot
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Current node: null
[17:41:00] [Server thread/ERROR]: #!#! Current item: send "%max({test17::*}(as java.lang.Number))%" to the command sender
[17:41:00] [Server thread/ERROR]: #!#! Current trigger: command /test17 (simple event) (test.sk, line -1)
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Thread: Server thread
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! Language: english
[17:41:00] [Server thread/ERROR]: #!#! Link parse mode: DISABLED
[17:41:00] [Server thread/ERROR]: #!#!
[17:41:00] [Server thread/ERROR]: #!#! End of Error.
[17:41:00] [Server thread/ERROR]: #!#!
Server Information
The text was updated successfully, but these errors were encountered: