18.03.2017, 20:39
I have this query:
But i'm getting this.
To all over the code.
Second question: Is necessary to do like (an example):
Player[playerid]Score] = 0; after the registration?
Or i just need to set 0 as default in the Score row in database?
Thanks.
pawn Код:
UpdatePlayerData(playerid)
{
if (Player[playerid][IsLoggedIn] == false) return 0;
new query[145];
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Kills` = %d, SET `Deaths` = %d, SET `Score` = %d, SET `Money` = %d, SET `Level` = %d, SET `Cookies` = %d, SET `Warns` = %d WHERE `id` = %d LIMIT 1",
Player[playerid][Kills]);
Player[playerid][Deaths]);
Player[playerid][Score]);
Player[playerid][Money]);
Player[playerid][Level]);
Player[playerid][Cookies]);
Player[playerid][Warns]);
Player[playerid][ID]);
mysql_tquery(g_SQL, query);
return 1;
}
Код:
warning 215: expression has no effect error 001: expected token: ";", but found ")"
Second question: Is necessary to do like (an example):
Player[playerid]Score] = 0; after the registration?
Or i just need to set 0 as default in the Score row in database?
Thanks.