22.11.2011, 18:43
pawn Code:
//======[OnPlayerDisconnect]=====
public OnPlayerDisconnect(playerid, reason)
{
if(Logged[playerid] == 1)
{
//If the player disconnects before registering,
//we want to make sure it doesn't try update
//so we check if the player is logged in.
new score = GetPlayerScore(playerid); //Gets players score
new money = GetPlayerMoney(playerid); //Gets players money
new skin = GetPlayerSkin(playerid); // Gets players skin
new query[200], pname[24]; //Creates the variables
GetPlayerName(playerid, pname, 24); //Gets the players name.
format(query, sizeof(query), "UPDATE playerdata SET score=%d, money=%d, Kills=%d, Deaths=%d Adminlevel=%d, Skin=%d, Faction='%s', Donator='%s', Weaponlic='%s', Flylic='%s', Driverlic='%s', Tier=%d WHERE user='%s', Score,Money, PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], PlayerInfo[playerid][Adminlevel], skin, PlayerInfo[playerid][Faction], PlayerInfo[playerid][Donator], PlayerInfo[playerid][Weaponlic], PlayerInfo[playerid][Flylic], PlayerInfo[playerid][Driverlic], PlayerInfo[playerid][Tier], pname);
mysql_query(query);
//No need to store a result for a update string
}
return 1;
}
// GetPlayerName(pl == 299
// format(query, sizeof(query), == 300
Code:
C:\Documents and Settings\(299) : error 075: input line too long (after substitutions) C:\Documents and Settings\(300) : error 037: invalid string (possibly non-terminated string) C:\Documents and Settings\(300) : error 017: undefined symbol "UPDATE" C:\Documents and Settings\(300) : error 017: undefined symbol "playerdata" C:\Documents and Settings\(300) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.