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 ")"
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;
}
UPDATE players SET kills = %d, Deaths = %d, ... WHERE condition = your_condition ",...); |
UpdatePlayerData(playerid)
{
if (Player[playerid][IsLoggedIn] == false) return 0;
new query[145];
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Kills` = %d,`Deaths` = %d,`Score` = %d,`Money` = %d, `Level` = %d,`Cookies` = %d, `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;
}
UpdatePlayerData(playerid) { if (Player[playerid][IsLoggedIn] == false) return 0; new query[180]; mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Kills` = %d,`Deaths` = %d,`Score` = %d,`Money` = %d, `Level` = %d,`Cookies` = %d, `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); } |
AssignPlayerData(playerid)
{
cache_get_value_int(0, "id", Player[playerid][ID]);
cache_get_value_int(0, "Kills", Player[playerid][Kills]);
cache_get_value_int(0, "Deaths", Player[playerid][Deaths]);
cache_get_value_int(0, "Score", SetPlayerScore(playerid,Player[playerid][Score]);
cache_get_value_int(0, "Money", GivePlayerMoney(playerid,Player[playerid][Money]);
cache_get_value_int(0, "Level", Player[playerid][Level]);
cache_get_value_int(0, "Cookies", Player[playerid][Cookies]);
cache_get_value_int(0, "Warns", Player[playerid][Warns]);
return 1;
}
UpdatePlayerData(playerid)
{
if (Player[playerid][IsLoggedIn] == false) return 0;
new query[180];
mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Kills` = %d,`Deaths` = %d,`Score` = %i,`Money` = %i, `Level` = %d,`Cookies` = %d, `Warns` = %d WHERE `id` = %d LIMIT 1",
Player[playerid][Kills],
Player[playerid][Deaths],
GetPlayerScore(playerid),
GetPlayerMoney(playerid),
Player[playerid][Level],
Player[playerid][Cookies],
Player[playerid][Warns],
Player[playerid][ID]);
mysql_tquery(g_SQL, query);
return 1;
}
AssignPlayerData(playerid) { Player[playerid][ID] = cache_get_value_int(0, "id"); Player[playerid][Kills] = cache_get_value_int(0, "Kills"); Player[playerid][Deaths] = cache_get_value_int(0, "Deaths"); Player[playerid][Score] = cache_get_value_int(0, "Score"); Player[playerid][Money] = cache_get_value_int(0, "Money"); Player[playerid][Level] = cache_get_value_int(0, "Level"); Player[playerid][Cookies] = cache_get_value_int(0, "Cookies"); Player[playerid][Warns] = cache_get_value_int(0, "Warns"); SetPlayerScore(playerid, Player[playerid][Score]); SetPlayerMoney(playerid, Player[playerid][Money]); return 1; } |
error 017: undefined symbol "cache_get_value_int_ovrld" |