UpdatePlayerData(playerid) { if (Player[playerid][IsLoggedIn] == false) return 0; // if the client crashed, it's not possible to get the player's position in OnPlayerDisconnect callback // so we will use the last saved position (in case of a player who registered and crashed/kicked, the position will be the default spawn point) new query[700]; mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `sexe` = %d, `ethnie` = %d, `age` = %d, `skin` = %d, `level` = %d, `adminlevel` = %d, `banned` = %d, `faction` = %d, `cash` = %d, `rankfaction` = %d, \ %d WHERE `id` = %d LIMIT 1", Player[playerid][Sexe], Player[playerid][Ethnie], Player[playerid][Age], Player[playerid][Skin], Player[playerid][Level], Player[playerid][AdminLevel], Player[playerid][Banned], Player[playerid][Faction], Player[playerid][Cash], Player[playerid][ID]); //mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `rankfaction` = %d WHERE `id` = %d LIMIT 1", Player[playerid][RankFaction], Player[playerid][ID]); mysql_tquery(dbhandle, query); return 1; }
C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn(1056) : error 075: input line too long (after substitutions) C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn(1057) : error 037: invalid string (possibly non-terminated string) C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn(1057) : error 017: undefined symbol "UPDATE" C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn(1057) : error 029: invalid expression, assumed zero C:\Users\\Desktop\BLANK_SCRIPT\gamemodes\mysql.pwn(1057) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
UpdatePlayerData(playerid) { if (Player[playerid][IsLoggedIn] == false) return 0; // if the client crashed, it's not possible to get the player's position in OnPlayerDisconnect callback // so we will use the last saved position (in case of a player who registered and crashed/kicked, the position will be the default spawn point) new query[700]; mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `sexe` = '%d', `ethnie` = '%d', `age` = '%d', `skin` = '%d', `level` = '%d', `adminlevel` = '%d', `banned` = '%d', `faction` = '%d', `cash` = '%d', `rankfaction` = '%d' WHERE `id` = '%d' LIMIT 1", // %d WHERE `id` = %d LIMIT 1", Player[playerid][Sexe], Player[playerid][Ethnie], Player[playerid][Age], Player[playerid][Skin], Player[playerid][Level], Player[playerid][AdminLevel], Player[playerid][Banned], Player[playerid][Faction], Player[playerid][Cash], Player[playerid][ID]); Player[playerid][Sexe], Player[playerid][Ethnie], Player[playerid][Age], Player[playerid][Skin], Player[playerid][Level], Player[playerid][AdminLevel], Player[playerid][Banned], Player[playerid][Faction], Player[playerid][Cash], Player[playerid][RankFaction], ); //mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `rankfaction` = %d WHERE `id` = %d LIMIT 1", Player[playerid][RankFaction], Player[playerid][ID]); // mysql_tquery(dbhandle, query, false, "", ""); mysql_tquery(dbhandle, query); return 1; } |
UpdatePlayerData(playerid)
{
if (Player[playerid][IsLoggedIn] == false) return 0;
// if the client crashed, it's not possible to get the player's position in OnPlayerDisconnect callback
// so we will use the last saved position (in case of a player who registered and crashed/kicked, the position will be the default spawn point)
new query[700];
new strcatquery[700];
strcat(strcatquery, "UPDATE `players` SET `sexe` = '%d', `ethnie` = '%d', `age` = '%d', `skin` = '%d', `level` = '%d', `adminlevel` = '%d', `banned` = '%d', `faction` = '%d', `cash` = '%d', `rankfaction` = '%d' WHERE `id` = '%d' LIMIT 1");
mysql_format(dbhandle, query, sizeof query, strcatquery, Player[playerid][Sexe],Player[playerid][Ethnie],Player[playerid][Age],Player[playerid[Skin],Player[playerid[Level],Player[playerid[AdminLevel],Player[playerid[Banned],Player[playerid][Faction],Player[playerid][Cash],Player[playerid][RankFaction],);
//mysql_format(dbhandle, query, sizeof query, "UPDATE `players` SET `rankfaction` = %d WHERE `id` = %d LIMIT 1", Player[playerid][RankFaction], Player[playerid][ID]);
// mysql_tquery(dbhandle, query, false, "", "");
mysql_tquery(dbhandle, query);
return 1;
}