Originally Posted by Kindred
pawn Код:
format(queryString, sizeof(queryString), "UPDATE utenti SET rank = '%d', soldi = '%d', id = '%d', level = '%d', experience = '%d', maxexp = '%d', tutorial = '%d'",Giocatore[playerid][rank],Giocatore[playerid][soldi],Giocatore[playerid][id],Giocatore[playerid][livello],Giocatore[playerid][exp],Giocatore[playerid][maxexp],Giocatore[playerid][tutorial]); format(queryString, sizeof(queryString),"%s, CX = '%f', CY = '%f', CZ = '%f WHERE username = '%s'",queryString,Giocatore[playerid][APOS][0],Giocatore[playerid][APOS][1],Giocatore[playerid][APOS][2],NomeX(playerid));
You are formatting it twice, therefore after you format it the first time, the string will only be the second format.
If you format directly after another format without doing anything to the first format, it will be overwrited.
pawn Код:
new queryString2[256]; //Change to string length format(queryString, sizeof(queryString), "UPDATE utenti SET rank = '%d', soldi = '%d', id = '%d', level = '%d', experience = '%d', maxexp = '%d', tutorial = '%d'",Giocatore[playerid][rank],Giocatore[playerid][soldi],Giocatore[playerid][id],Giocatore[playerid][livello],Giocatore[playerid][exp],Giocatore[playerid][maxexp],Giocatore[playerid][tutorial]); format(queryString2, sizeof(queryString),"%s, CX = '%f', CY = '%f', CZ = '%f WHERE username = '%s'",queryString,Giocatore[playerid][APOS][0],Giocatore[playerid][APOS][1],Giocatore[playerid][APOS][2],NomeX(playerid)); strcat(queryString, queryString2); //Add queryString2 to queryString.
Try this
|