-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Functions which include waiting for a timespan cannot return a value #7100
Comments
I'm pretty sure this is intended. Below is my warning when trying your code. I don't think functions allow waits.
|
Probably related to #4005 |
This has been a known issue for a long time but I don't think there is a issue for it. Essentially sometimes the error works and sometimes it doesn't. There is a condition that makes the error happen and other times it doesn't. Probably when it's not on the main thread or not on the same event scope. It should always error. |
The error difference is due to skript-reflect registering a different return effect and a different error. |
Oh I remember now. So skript-reflect should error if it's not in a custom syntax element, and do so silently, because if it uses Skript.error in the init, Skript won't continue onwards with checking other elements. Which is what is happening here. |
Skript/Server Version
https://imgur.com/a/4BPA9Ez
Bug Description
Let's say we have a function x defined as follows:
Upon reloading the Skript containg the function, the error "The return effect can only be use in functions, custom expressions, sections, custom syntax parse sections, and custom conditions"
Expected Behavior
I expect the Skript to reload with no errors.
Steps to Reproduce
Create a new Skript file. Paste the following:
Save, then reload the Skript.
Errors or Screenshots
No response
Other
No response
Agreement
The text was updated successfully, but these errors were encountered: