-
-
Notifications
You must be signed in to change notification settings - Fork 392
error with "function {@title}name()" on start #2492
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
Comments
This just looks like an issue with reloading your server, which you shouldn't be doing anyways. Can you confirm this also happens with restarts? |
Needs testing if it can occur with restarts. |
I've just started a fresh-new 1.16.1 Paper server with v2.5-alpha5 Skript and turned it on with no scripts, then I copy-pasted the script from OP into
|
This happens because function signatures are loaded before option section (function signatures are loaded in the structure: https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/ScriptLoader.java#L930, options are loaded after that: https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/ScriptLoader.java#L602) |
So we have to choose between |
The fix would probably be to include options in the structure loading, with the added bonus that all the options can be replaced before the script is even loaded, so there won't be the need to use |
Uh oh!
There was an error while loading. Please reload this page.
Description
when the server start or after a /reload,
any function using "options" as :
function {@title}f():
will thrown an error and can't be used BUT after a /skript reload all, the function can be used without any error
Steps to Reproduce
use a server spigot or paper 1.14.4 with ONLY skript-2.4Beta7 or 2.4Beta8 with only 1 script .sk
start the server and look the warn on console.
test the function ( for exemple in chat or console write !testf() ) and it will not work cause the function is not loaded
do a /sk reload all and test the function, it work
Errors / Screenshots
The text was updated successfully, but these errors were encountered: