Skript icon indicating copy to clipboard operation
Skript copied to clipboard

ExperimentalSyntax Error Messages

Open Absolutionism opened this issue 7 months ago • 3 comments

Description

The problem When SyntaxElements implementing ExperimentalSyntax were not satisfied, there was no error explaining why and defaulted to Can't understand this ... which can be misleading.

Solution Now returns an ExperimentData that contains Experiments that are required and/or disallowed. If the requirements are not met, will print an error message either by the manual set message or constructing a messsage,


Target Minecraft Versions: any Requirements: none Related Issues: none

Absolutionism avatar May 12 '25 19:05 Absolutionism

I think this could be done better with an intermediate experiment interface like you did with the equip component

Oh you mean like the EquippableExperiment interface I made that just extended ExperimentalSyntax?

Absolutionism avatar May 13 '25 04:05 Absolutionism

Looking better. Also, I wouldn't put the QueueExperimentSyntax and ReflectionExperimentSyntax types in the lang directory. Maybe put them where Feature is: https://github.com/SkriptLang/Skript/tree/master/src/main/java/ch/njol/skript/registrations

Like just straight in there or in a new package? It seems kinda off to put them in there though

Absolutionism avatar May 16 '25 18:05 Absolutionism

Like just straight in there or in a new package? It seems kinda off to put them in there though

I think there is fine, or you could do a subpackage like experiments in ch.njol.skript.registration. If you happen to think of something else, feel free to propose it

APickledWalrus avatar May 16 '25 18:05 APickledWalrus