Function can be asynchronous?

  • 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.

xbxy

Active Member
Jan 26, 2017
170
8
0
28
Code:
function c(s:string) :: object:
    send {@c_console} to console
    set {_c::*} to {_s} split at "//"
    if {_c::1} is "mysql":
        set {_c1} to mysql result of query "SELECT %{_c::3}% FROM %{_c::2}% WHERE %{_c::4}%='%{_c::5}%'"
        if {_c::6} is "string":
            set {_c2::*} to mysql string {_c::3} in {_c1}
        else if {_c::6} is "object":
            set {_c2::*} to mysql object {_c::3} in {_c1}
        else if {_c::6} is "Boolean":
            set {_c2::*} to mysql Boolean {_c::3} in {_c1}
        else if {_c::6} is "number":
            set {_c2::*} to mysql number {_c::3} in {_c1}
        else if {_c::6} is "integer":
            set {_c2::*} to mysql integer {_c::3} in {_c1}
        else if {_c::6} is "integer":
            set {_c2::*} to mysql integer {_c::3} in {_c1}
        if {_c2::1} is set:
            return {_c2::1}
        return "none"

command /i:
    trigger:
        $ thread
        set {_c0} to c("mysql//my//m1//name//xbxy//string")
        send {_c0}
Is there any problem with these codes?
[doublepost=1519540913,1519540878][/doublepost]@LimeGlass
[doublepost=1519540966][/doublepost]If this code is no problem
Then he can asynchronous whole function?
[doublepost=1519541173][/doublepost]@Snow-Pyon
 
No a function that returns can't have any async methods within them or delays. Use with caution, it may work but might have negative results. Also don't tag random people for help, snow doesn't like getting tagged for random help threads.
 
Last edited:
Status
Not open for further replies.