force wait in the server stop

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Spartan9802

Member
Jan 26, 2017
158
8
18
26
Is it possible to create a wait before the server closes, to save data in a mysql database?
 
I use SkQuery for my Mysql this line ^^

code_language.skript:
$ thread
update "UPDATE `%{_key}%` SET `numbers`='%amount of {_item.%loop-number%}%', `id`='%{_id.%loop-number%}%', `data`='%{_data.%loop-number%}%', `nbt`='%{_nbt.%loop-number%}%'  WHERE `slot` ='%loop-number%'"
 
I use SkQuery for my Mysql this line ^^

code_language.skript:
$ thread
update "UPDATE `%{_key}%` SET `numbers`='%amount of {_item.%loop-number%}%', `id`='%{_id.%loop-number%}%', `data`='%{_data.%loop-number%}%', `nbt`='%{_nbt.%loop-number%}%'  WHERE `slot` ='%loop-number%'"
Don't run it aync and please close your issue on benskus GitHub. it doesn't belong there.
 
Yes work wtrh yaml i close my ticket on github the problem is Skquery i have remove $thread not work :c

I test sync: of mundosk
[doublepost=1498174072,1497267870][/doublepost]Plz help me :/
 
I don't know much about mysql or sync stuff but if you need a simple delay you can do this:
code_language.skript:
on command "/stop":
    cancel event
    wait 5 seconds
    execute console command "/stop"
 
The only way is removing the $ thread. It needs to update that in main server thread, so the server will wait the task finish before closing completely. Any sync or async task may not work because the server will close before it finish anyway.
 
Status
Not open for further replies.