SkriptLang / skript-reflect

Powerful reflection utilities for Skript.
MIT License
56 stars 19 forks source link

Functions being delayed doesn't properly error #79

Open TheLimeGlass opened 4 months ago

TheLimeGlass commented 4 months ago

Skript/Server Version

2.8.0-dev
Paper 1.20.1

Bug Description

The error at https://github.com/SkriptLang/Skript/blob/1a009cdb1419292046de0e95429bcb40eaaaab15/src/main/java/ch/njol/skript/effects/EffReturn.java#L73 is not properly erroring when a delay is added into a function. Instead Skript is erroring stating that the return effect cannot be used in a function, when this is indeed incorrect.

Expected Behavior

To properly print the error stating delays cannot be used in functions.

Steps to Reproduce

function testing(empty: boolean = false) :: boolean:
    wait a second
    return true

Errors or Screenshots

2023-12-27_12 35 59

Other

Return API https://github.com/SkriptLang/Skript/pull/6118 which is not on this Skript jar.

Agreement

Fusezion commented 4 months ago

This isn't skript issue this is reflect, put over there. they have their own system and overrides skript's

TheLimeGlass commented 4 months ago

https://github.com/SkriptLang/skript-reflect/pull/78

TheLimeGlass commented 4 months ago

Actually keeping this open for an admin to transfer this issue.