SA-MP Forums Archive
Query problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Query problem (/showthread.php?tid=636303)



Query problem - StR_MaRy - 24.06.2017

Hey guys i did a command to show me the querys but i get this error

Код HTML:
[ERROR] mysql_unprocessed_queries - invalid connection handle (id: 0)
Код HTML:
CMD:test(playerid)
{
	foreach(new i : Player)
    {
		new msg[60];
		format(msg, sizeof(msg), "Ticks: %d | Queryes: %d", GetServerTickRate(), mysql_unprocessed_queries(i));
	    SCM(playerid, -1, msg);
	}    
	return 1;
}
what could be the problem ? , and the ticks: are 190 - 200 is that ok ? cause i started a grandlarc gamemode and i had the same ticks: should be ok ?


Re: Query problem - Vince - 24.06.2017

Uh, that doesn't make sense. You're passing a playerid where you should be passing a connection handle ...
Also, uhm, use SendClientMessageToAll?


Re: Query problem - StR_MaRy - 24.06.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
Uh, that doesn't make sense. You're passing a playerid where you should be passing a connection handle ...
Also, uhm, use SendClientMessageToAll?
so what should i put instead of (i) ?


Re: Query problem - Vince - 24.06.2017

The connection handle? You know ...
PHP код:
connectionHandle mysql_connect(...); 



Re: Query problem - StR_MaRy - 24.06.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
The connection handle? You know ...
PHP код:
connectionHandle mysql_connect(...); 
ok, thx