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

Cannot create custom expressions #100

Closed
EquipableMC opened this issue Mar 10, 2024 · 8 comments
Closed

Cannot create custom expressions #100

EquipableMC opened this issue Mar 10, 2024 · 8 comments

Comments

@EquipableMC
Copy link

EquipableMC commented Mar 10, 2024

Describe the bug
When you create a custom expression then reload the skript, skript cancels the reloading of the file and throws a huge error in console

To reproduce

  1. Create a skript file
  2. use the code listed below:
expression glowing %item%:
	return type: item
	get:
		set {_item} to expr-1
		if {_item} is a fishing rod:
			enchant {_item} with infinity 1
		else:
			enchant {_item} with lure 1		
		return {_item} with hide enchants item flag
  1. reload the file

Expected behavior
Its meant to give items the shiny/glowing effect.

Error
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! [Skript] Severe Error:
[08:50:43 ERROR]: #!#! Exception occurred in Skript's main command
[08:50:43 ERROR]: #!#! Used command: /sk reload /main/api.sk
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Something went horribly wrong with Skript.
[08:50:43 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[08:50:43 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[08:50:43 ERROR]: #!#! Here is full list of them:
[08:50:43 ERROR]: #!#! skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders) skript-citizens v1.0.0 skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect) skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui) DiSky v4.12.2-beta1 SkBee v3.4.1 (https://github.com/ShaneBeee/SkBee) SkLogs v1.1.1 (https://github.com/EquipableMC/SkLogs)
[08:50:43 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[08:50:43 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[08:50:43 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[08:50:43 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[08:50:43 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[08:50:43 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Stack trace:
[08:50:43 ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "java.util.Map.remove(Object)" because "syntaxes" is null
[08:50:43 ERROR]: #!#! at skript-reflect.jar//org.skriptlang.reflect.syntax.CustomSyntaxStructure.lambda$unload$1(CustomSyntaxStructure.java:158)
[08:50:43 ERROR]: #!#! at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[08:50:43 ERROR]: #!#! at skript-reflect.jar//org.skriptlang.reflect.syntax.CustomSyntaxStructure.unload(CustomSyntaxStructure.java:153)
[08:50:43 ERROR]: #!#! at Skript (5).jar//ch.njol.skript.ScriptLoader.unloadScripts(ScriptLoader.java:830)
[08:50:43 ERROR]: #!#! at Skript (5).jar//ch.njol.skript.ScriptLoader.unloadScript(ScriptLoader.java:864)
[08:50:43 ERROR]: #!#! at Skript (5).jar//ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:189)
[08:50:43 ERROR]: #!#! at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[08:50:43 ERROR]: #!#! at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[08:50:43 ERROR]: #!#! at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:929)
[08:50:43 ERROR]: #!#! at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[08:50:43 ERROR]: #!#! at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
[08:50:43 ERROR]: #!#! at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:322)
[08:50:43 ERROR]: #!#! at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:306)
[08:50:43 ERROR]: #!#! at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2297)
[08:50:43 ERROR]: #!#! at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$20(PlayerConnection.java:2257)
[08:50:43 ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[08:50:43 ERROR]: #!#! at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[08:50:43 ERROR]: #!#! at net.minecraft.server.TickTask.run(TickTask.java:18)
[08:50:43 ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[08:50:43 ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1342)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197)
[08:50:43 ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.bi(MinecraftServer.java:1319)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1312)
[08:50:43 ERROR]: #!#! at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.i_(MinecraftServer.java:1290)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1178)
[08:50:43 ERROR]: #!#! at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
[08:50:43 ERROR]: #!#! at java.base/java.lang.Thread.run(Thread.java:840)
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Version Information:
[08:50:43 ERROR]: #!#! Skript: 2.8.3 (latest)
[08:50:43 ERROR]: #!#! Flavor: skriptlang-github
[08:50:43 ERROR]: #!#! Date: 16:23:04.254419600
[08:50:43 ERROR]: #!#! Bukkit: 1.19.4-R0.1-SNAPSHOT
[08:50:43 ERROR]: #!#! Minecraft: 1.19.4
[08:50:43 ERROR]: #!#! Java: 17.0.10 (OpenJDK 64-Bit Server VM 17.0.10+7)
[08:50:43 ERROR]: #!#! OS: Linux amd64 5.15.0-91-generic
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Server platform: Paper
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Current node: null
[08:50:43 ERROR]: #!#! Current item: null
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Thread: Server thread
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! Language: english
[08:50:43 ERROR]: #!#! Link parse mode: DISABLED
[08:50:43 ERROR]: #!#!
[08:50:43 ERROR]: #!#! End of Error.
[08:50:43 ERROR]: #!#!

Server information

  • skript-reflect: 2.4
  • Skript: 2.8.3
  • Bukkit 1.19.4-R0.1-SNAPSHOT
  • Minecraft: 1.19.4
  • Java: 17.0.10 (OpenJDK 64-Bit Server VM 17.0.10+7)
  • OS: Linux amd64 5.15.0-91-generic

Additional context
Skript info:
[08:58:21 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[08:58:21 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[08:58:21 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[08:58:21 INFO]: [Skript] Server Version: git-Paper-550 (MC: 1.19.4)
[08:58:21 INFO]: [Skript] Skript Version: 2.8.3 (skriptlang-github)
[08:58:21 INFO]: [Skript] Installed Skript Addons:
[08:58:21 INFO]: [Skript] - skript-placeholders v1.6.0 (https://github.com/APickledWalrus/skript-placeholders)
[08:58:21 INFO]: [Skript] - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[08:58:21 INFO]: [Skript] - DiSky v4.12.2-beta1
[08:58:21 INFO]: [Skript] - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[08:58:21 INFO]: [Skript] - skript-citizens v1.0.0
[08:58:21 INFO]: [Skript] - SkBee v3.4.1 (https://github.com/ShaneBeee/SkBee)
[08:58:21 INFO]: [Skript] - SkLogs v1.1.1 (https://github.com/EquipableMC/SkLogs)
[08:58:21 INFO]: [Skript] Installed dependencies:
[08:58:21 INFO]: [Skript] - Vault v1.7.3-b131

@EquipableMC
Copy link
Author

I was wondering if there is a nightly build I can use that fixes this until a new version is released?

@AyhamAl-Ali
Copy link
Member

Are you sure it's not a duplicate of #86? I assume it may be a duplicate of an addon's expression. Try to change glowing to gloowing and see if it works.

@EquipableMC
Copy link
Author

EquipableMC commented Mar 10, 2024

Are you sure it's not a duplicate of #86? I assume it may be a duplicate of an addon's expression. Try to change glowing to gloowing and see if it works.

No addons have glowing that I have installed. Skbee I know doesn't have it, skript-citizens is a self build of nylhus's skript-citizens addon plugin (it's modified to support 1.19+)

@AyhamAl-Ali
Copy link
Member

Are you sure it's not a duplicate of #86? I assume it may be a duplicate of an addon's expression. Try to change glowing to gloowing and see if it works.

No addons have glowing that I have installed. Skbee I know doesn't have it, skript-citizens is a self build of nylhus's skript-citizens addon plugin (it's modified to support 1.19+)

Still try to change glowing to something unique. Maybe one of your other scripts have the same custom expression?

@EquipableMC
Copy link
Author

Are you sure it's not a duplicate of #86? I assume it may be a duplicate of an addon's expression. Try to change glowing to gloowing and see if it works.

No addons have glowing that I have installed. Skbee I know doesn't have it, skript-citizens is a self build of nylhus's skript-citizens addon plugin (it's modified to support 1.19+)

Still try to change glowing to something unique. Maybe one of your other scripts have the same custom expression?

None of them do, I only have 3 skript files. One for a scoreboard, one for my discord bot, and one for functions and custom expressions (where that glowing expression is located at)

@EquipableMC
Copy link
Author

I'll still try glooowing right now though ^^

@EquipableMC
Copy link
Author

EquipableMC commented Mar 10, 2024

weird, it no longer errors, It let me do glowing now, strange

@Pikachu920
Copy link
Member

Pikachu920 commented Mar 10, 2024

it happens when you have the same custom syntax declared more than once (even in another script). If you can reproduce the error without that, please leave a comment with the scripts to reproduce

@Pikachu920 Pikachu920 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants