Open Lotzyprod opened 3 months ago
Analysing this problem further, a new problem emerged, I believe that now Skript is trying to parse events before structures (or custom event parsed before custom event creation section for no reason). Because of this, when parsing a custom event (not the custom event creation section), on this line:
https://github.com/SkriptLang/skript-reflect/blob/7c3cbfdb24e1c59e836c7f04276aae87c66fdb66/src/main/java/org/skriptlang/reflect/syntax/event/elements/CustomEvent.java#L52
always be null if we has custom event structure and handler in same script file.
It turns out that regardless of the presence of a parse
section, the event can be used before loading parse
section.
In the case when the event handler is located in another script file, everything seems to be fine, but the parse section still works strangely.
Somehow, magically, instance of SyntaxParseEvent is automatically marked to continue, even if 'continue' was not specified in the parse
section:
https://github.com/SkriptLang/skript-reflect/blob/7c3cbfdb24e1c59e836c7f04276aae87c66fdb66/src/main/java/org/skriptlang/reflect/syntax/event/elements/CustomEvent.java#L66C1-L76C37
Describe the bug You can't do anything in parse section. Variables isn't saved to use it in check section, you cant get literals and e.t.c
To reproduce
Expected behavior {_a} variable is 1 at start of check section {_regex} will = "regex"
Server information