SA-MP Forums Archive
[Help] Commands out of sync; you can't run this command now - 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: [Help] Commands out of sync; you can't run this command now (/showthread.php?tid=513986)



[Help] Commands out of sync; you can't run this command now - bigtigerbeee - 19.05.2014

Код:
[11:54:13] >> mysql_query( Connection handle: 1 )

[11:54:13] CMySQLHandler::Query(UPDATE aacoutsername SET playerAmmoSpa ='500' WHERE playerID ='11223') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[11:54:13] >> mysql_query( Connection handle: 1 )

[11:54:13] CMySQLHandler::Query(UPDATE aacoutsername SET playerAmmoFir ='0' WHERE playerID ='11223') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[11:54:13] >> mysql_query( Connection handle: 1 )

[11:54:13] CMySQLHandler::Query(UPDATE aacoutsername SET playerCharge1 ='54' WHERE playerID ='11223') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)
code

Код:
new szQueryOutput[256];

		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerAmmoSpa ='%d' WHERE playerID ='%d'", playerVariables[playerid][pAmmoSpray], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);
		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerAmmoFir ='%d' WHERE playerID ='%d'", playerVariables[playerid][pAmmoFire], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);
		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerCharge1 ='%d' WHERE playerID ='%d'", playerVariables[playerid][pCharge][2], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);
		format(szQueryOutput, sizeof(szQueryOutput), "UPDATE aacoutsername SET playerCharge2 ='%d' WHERE playerID ='%d'", playerVariables[playerid][pCharge][3], playerVariables[playerid][pInternalID]);
		mysql_query(szQueryOutput);

.
.
.



Re: [Help] Commands out of sync; you can't run this command now - jihadmeneer - 19.05.2014

https://sampforum.blast.hk/showthread.php?tid=196441

Use the search button my friend, you didn't free the result.

And please..Step over to threaded queries these are way faster.


Re: [Help] Commands out of sync; you can't run this command now - bigtigerbeee - 20.05.2014

free the result

Use this function to store result after using SELECT, SHOW, DESCRIBE, EXPLAIN or CHECK TABLE query ?

but I'm UPDATE


Re: [Help] Commands out of sync; you can't run this command now - jihadmeneer - 20.05.2014

Quote:
Originally Posted by bigtigerbeee
Посмотреть сообщение
free the result

Use this function to store result after using SELECT, SHOW, DESCRIBE, EXPLAIN or CHECK TABLE query ?

but I'm UPDATE
Why are you sending 4 different query's when you can do it with one?


Re: [Help] Commands out of sync; you can't run this command now - bigtigerbeee - 20.05.2014

coz can't input long query in mysql

Here > https://sampforum.blast.hk/showthread.php?tid=487234