Solved How does "$ thread" work?

  • 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 community!

    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.

LordBoos

New Member
Mar 1, 2017
5
0
0
Hello, how does "$ thread" work?
Does it run all following lines in the new thread or just one single following line?

If I have something like:
code_language.skript:
on join:
    set {_player} to player
    $ thread
    set {_isset} to text from url "someUrl/statistics?a=isset&player=%player%"
    set {_now} to text from url "someUrl/statistics?a=now"
    if {_isset} is "1":
        $ thread
        update "UPDATE `playerstatistic` SET `lastlogin`='%{_now}%' WHERE playername LIKE '%{_player}%'"
    else:
        message "NIC"
        $ thread
        update "INSERT INTO `playerstatistic` (`playername`, `lastlogin`, `lastlogout`) VALUES ('%{_player}%', '%{_now}%', '');"

Are "$ thread" above SQL updates necesary, or is it sufficient to have "$ thread" at the start?
 
Status
Not open for further replies.