25.07.2009, 17:16
Next Problem: I just found out that for me the multithreading-function doesn't work at all.
The test-code was an empty gamemode with the following modifications:
Info: SELECT sleep(10), 55 returns "sleep(10) 55" after 10 seconds, but that's not interesting as OnQueryFinish returns the query.
But when I type /mysqltest and then enter some chat text, nothing happens. After 10 seconds, "query sent" appears and all I entered is written to the chat. Also, there is no sync during these 10 seconds.
Is this an error in the plugin or did I start the query in a wrong way?
Thanks,
Webflori
The test-code was an empty gamemode with the following modifications:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mysqltest", cmdtext, true) == 0)
{
mysql_query("SELECT sleep(10), 55", 5);
SendClientMessageToAll(0xFFFFFFFF, "query sent");
return 1;
}
return 0;
}
public OnQueryFinish(query[],resultid)
{
printf("%d: %s", resultid, query);
}
But when I type /mysqltest and then enter some chat text, nothing happens. After 10 seconds, "query sent" appears and all I entered is written to the chat. Also, there is no sync during these 10 seconds.
Is this an error in the plugin or did I start the query in a wrong way?
Thanks,
Webflori

