So not to sure if this is a bug or not but i'm unable to return a function over 2 skript files, i can access the function fine if it does not return anything however if i try get it to return something across 2 files it'll give me an error like this
If i try return the function in the same file it's created in then it works however if i try return it in a different file to where it's created it will return this error, here's my skript.
File1.sk
File2.sk
Also note if it wasn't clear, File1 loads before File2 so it's not a matter of the function not loading.
code_language.skript:
[15:12:23] [Server thread/ERROR]: #!#! ch.njol.skript.SkriptAPIException: Signature of function is null when return type is asked!
If i try return the function in the same file it's created in then it works however if i try return it in a different file to where it's created it will return this error, here's my skript.
File1.sk
code_language.skript:
on skript load:
set mysql host to "localhost" # Connecting to MYSQL database to update server status
set mysql username to "root"
set mysql password to "jordan1"
set mysql database to "RebornEncrypt"
set {_GetServerID} to yml value "ServerID" of file "plugins/Reborn/Config.yml"
skellett connect to mysql
mysql update "UPDATE Servers SET Status='Avaliable' WHERE ServerID='%{_GetServerID}%'"
function CheckServerStatus(s: string) :: string:
set {_s} to yml value "ServerID" of file "plugins/Reborn/Config.yml"
set {_result} to mysql result of query "SELECT Status FROM servers WHERE ServerID='%{_s}%'"
set {_s::*} to mysql string "Status" in {_result}
return {_s::1}
File2.sk
code_language.skript:
on join:
set {_temp} to CheckServerStatus("Check")
Also note if it wasn't clear, File1 loads before File2 so it's not a matter of the function not loading.
Last edited: