Sashie / skript-yaml

The proper way to do yaml in skript
MIT License
32 stars 22 forks source link

Non-scalar node limit exceeded by storing multiple crossbows loaded with fireworks. #43

Open sovdeeth opened 2 years ago

sovdeeth commented 2 years ago

I'm using YML to do inventory backups and ran into an issue with crossbows loaded with fireworks. In the attached yml, once there are three crossbows, the non-scalar node limit is exceeded and I'm unable to load the yml. The limit seems configurable, and I'd appreciate if it were raised a bit. However, 250 lines of yml for one item is a bit much so i'm going to pursue other ways of getting around this too, like only storing the unloaded crossbow.

Skript info

[23:42:58 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[23:42:58 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[23:42:58 INFO]: [Skript] Server Version: git-Paper-250 (MC: 1.18.2)
[23:42:58 INFO]: [Skript] Skript Version: 2.6.1-nightly-1737295
[23:42:58 INFO]: [Skript] Installed Skript Addons:
[23:42:58 INFO]: [Skript]  - skript-yaml v1.4
[23:42:58 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[23:42:58 INFO]: [Skript]  - SkBee v1.15.1 (https://github.com/ShaneBeee/SkBee)
[23:42:58 INFO]: [Skript]  - sk-discord v1.0
[23:42:58 INFO]: [Skript] Installed dependencies:
[23:42:58 INFO]: [Skript]  - WorldGuard v7.0.4+f7ff984

Console Error

[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! [Skript] Severe Error:
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! You're running a (buggy) nightly version of Skript.
[23:38:27 ERROR]: #!#! If this is not a test server, switch to a more stable release NOW!
[23:38:27 ERROR]: #!#! Your players are unlikely to appreciate crashes and/or data loss due to Skript bugs.
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Just testing things? Good. Please report this bug, so that we can fix it before a stable release.
[23:38:27 ERROR]: #!#! Issue tracker: https://github.com/SkriptLang/Skript/issues
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Stack trace:
[23:38:27 ERROR]: #!#! org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:172)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:245)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:186)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:245)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:186)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:245)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:186)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:314)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:305)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:286)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:188)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:115)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:142)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:151)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:491)
[23:38:27 ERROR]: #!#!     at org.yaml.snakeyaml.Yaml.load(Yaml.java:416)
[23:38:27 ERROR]: #!#!     at skript-yaml.jar//me.sashie.skriptyaml.utils.yaml.YAMLProcessor.load(YAMLProcessor.java:183)
[23:38:27 ERROR]: #!#!     at skript-yaml.jar//me.sashie.skriptyaml.skript.EffLoadYaml.load(EffLoadYaml.java:99)
[23:38:27 ERROR]: #!#!     at skript-yaml.jar//me.sashie.skriptyaml.skript.EffLoadYaml.execute(EffLoadYaml.java:67)
[23:38:27 ERROR]: #!#!     at Skript-nightly.jar//ch.njol.skript.lang.Effect.run(Effect.java:51)
[23:38:27 ERROR]: #!#!     at Skript-nightly.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:60)
[23:38:27 ERROR]: #!#!     at Skript-nightly.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[23:38:27 ERROR]: #!#!     at Skript-nightly.jar//ch.njol.skript.command.Commands.handleEffectCommand(Commands.java:283)
[23:38:27 ERROR]: #!#!     at Skript-nightly.jar//ch.njol.skript.command.Commands$3$1.call(Commands.java:217)
[23:38:27 ERROR]: #!#!     at Skript-nightly.jar//ch.njol.skript.command.Commands$3$1.call(Commands.java:214)
[23:38:27 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftFuture.run(CraftFuture.java:88)
[23:38:27 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[23:38:27 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1531)
[23:38:27 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:483)
[23:38:27 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1455)
[23:38:27 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1225)
[23:38:27 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[23:38:27 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:833)
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Version Information:
[23:38:27 ERROR]: #!#!   Skript: 2.6.1-nightly-1737295
[23:38:27 ERROR]: #!#!     Flavor: skriptlang-nightly
[23:38:27 ERROR]: #!#!     Date: 12:33:42.706900446
[23:38:27 ERROR]: #!#!   Bukkit: 1.18.2-R0.1-SNAPSHOT
[23:38:27 ERROR]: #!#!   Minecraft: 1.18.2
[23:38:27 ERROR]: #!#!   Java: 17.0.2 (OpenJDK 64-Bit Server VM 17.0.2+8)
[23:38:27 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Server platform: Paper
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Current node: null
[23:38:27 ERROR]: #!#! Current item: [re]load yaml "test.yml"
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Thread: Server thread
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! Language: english
[23:38:27 ERROR]: #!#! Link parse mode: DISABLED
[23:38:27 ERROR]: #!#!
[23:38:27 ERROR]: #!#! End of Error.
[23:38:27 ERROR]: #!#!

Used code:

!load yaml "test.yml"
# if you only have 2 crossbows in yml
!set {a::*} to (yml list "test" from "test")
!give {a::*} to player

Used Yaml: test.txt