Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when missing world in location function #3597

Closed
DarkvoidStudios opened this issue Dec 3, 2020 · 1 comment
Closed

Error when missing world in location function #3597

DarkvoidStudios opened this issue Dec 3, 2020 · 1 comment
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).

Comments

@DarkvoidStudios
Copy link

Server version: Paper #310

StartOptions:
java -Xms10G -Xmx20G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar Paper.jar nogui

Error:

[03:36:56 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[03:36:56 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[03:36:56 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[03:36:56 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[03:36:56 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! Stack trace:
[03:36:56 ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
[03:36:56 ERROR]: #!#!     at ch.njol.skript.classes.data.DefaultFunctions$23.execute(DefaultFunctions.java:315)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.classes.data.DefaultFunctions$23.execute(DefaultFunctions.java:1)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.function.Function.execute(Function.java:135)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:265)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.function.ExprFunctionCall.get(ExprFunctionCall.java:43)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:100)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:276)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:51)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:60)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.events.EvtScript.register(EvtScript.java:60)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader$4.call(ScriptLoader.java:737)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader$4.call(ScriptLoader.java:1)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:760)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.lambda$4(ScriptLoader.java:401)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:420)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:464)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.reloadScript(ScriptLoader.java:976)
[03:36:56 ERROR]: #!#!     at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:185)
[03:36:56 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[03:36:56 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[03:36:56 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:802)
[03:36:56 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:764)
[03:36:56 ERROR]: #!#!     at net.minecraft.server.v1_16_R3.DedicatedServer.handleCommandQueue(DedicatedServer.java:411)
[03:36:56 ERROR]: #!#!     at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:378)
[03:36:56 ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1207)
[03:36:56 ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:995)
[03:36:56 ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[03:36:56 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:832)
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! Version Information:
[03:36:56 ERROR]: #!#!   Skript: 2.5.2 (latest)
[03:36:56 ERROR]: #!#!     Flavor: skriptlang-github
[03:36:56 ERROR]: #!#!     Date: 2020-11-28
[03:36:56 ERROR]: #!#!   Bukkit: 1.16.4-R0.1-SNAPSHOT
[03:36:56 ERROR]: #!#!   Minecraft: 1.16.4
[03:36:56 ERROR]: #!#!   Java: 14.0.2 (OpenJDK 64-Bit Server VM 14.0.2+12-Ubuntu-120.04)
[03:36:56 ERROR]: #!#!   OS: Linux amd64 5.4.0-54-generic
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! Server platform: Paper
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! Current node: null
[03:36:56 ERROR]: #!#! Current item: set {epicspawn::spawn}(as java.lang.Object) to location([[double:0.5]], [[double:60.5]], [[double:0.5]], world "Spawn")
[03:36:56 ERROR]: #!#! Current trigger: load (script load) (system.sk, line 1)
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! Thread: Server thread
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! Language: english
[03:36:56 ERROR]: #!#! Link parse mode: DISABLED
[03:36:56 ERROR]: #!#!
[03:36:56 ERROR]: #!#! End of Error.
[03:36:56 ERROR]: #!#!

@ShaneBeee ShaneBeee changed the title Error when im reloading my skripts Error when missing world in location function Dec 4, 2020
@ShaneBeee
Copy link
Contributor

Ok, I have tested and can replicate this.

This issue is at the time of loading this script, the world is not available.

I can fix the error part, by providing a fallback world, but do keep in mind if your world is not loaded at the time of this script executing, the fallback world will be used.

@ShaneBeee ShaneBeee added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Dec 4, 2020
@ShaneBeee ShaneBeee added the completed The issue has been fully resolved and the change will be in the next Skript update. label Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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).
Projects
None yet
Development

No branches or pull requests

1 participant