08.06.2011, 16:18
hi, as you know i start to script in SQLite...
and i have a question
i have this on OnPlayerConnect!
and takes me this errors:
i know that line is too long but how i can decrease this query:
pls help me...!
and i have a question
i have this on OnPlayerConnect!
pawn Код:
public OnPlayerDisconnect(playerid)
{
format(Query, sizeof(Query), "UPDATE `ClanStats` SET (`ClanKills` = '%d', `ClanDeaths` = '%d') WHERE `ClanName` = '%s'",P_DATA[playerid][ClanKills], P_DATA[playerid][ClanDeaths]);
db_free_result(db_query(Database, Query));
format(Query, sizeof(Query), "UPDATE `ClanMembers` SET (`Member1` = '%s', `Member2` = '%s', `Member3` = '%s', `Member4` = '%s', `Member5` = '%s', `Member6` = '%s', `Member7` = '%s', `Member8` = '%s', `Member9` = '%s', `Member10` = '%s') WHERE `ClanSef` = '%s'", P_DATA[[playerid][Member1], P_DATA[[playerid][Member2], P_DATA[[playerid][Member3], P_DATA[[playerid][Member4], P_DATA[[playerid][Member5], P_DATA[[playerid][Member6], P_DATA[[playerid][Member7], P_DATA[[playerid][Member8], P_DATA[[playerid][Member9], P_DATA[[playerid][Member10], P_DATA[playerid][ClanSef]);
db_free_result(db_query(Database, Query));
return 1;
}
pawn Код:
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\filterscripts\ccsql.pwn(68) : error 075: input line too long (after substitutions)
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\filterscripts\ccsql.pwn(69) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\filterscripts\ccsql.pwn(69) : warning 215: expression has no effect
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\filterscripts\ccsql.pwn(69) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\filterscripts\ccsql.pwn(69) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\filterscripts\ccsql.pwn(69) : fatal error 107: too many error messages on one line
pawn Код:
format(Query, sizeof(Query), "UPDATE `ClanMembers` SET (`Member1` = '%s', `Member2` = '%s', `Member3` = '%s', `Member4` = '%s', `Member5` = '%s', `Member6` = '%s', `Member7` = '%s', `Member8` = '%s', `Member9` = '%s', `Member10` = '%s') WHERE `ClanSef` = '%s'", P_DATA[[playerid][Member1], P_DATA[[playerid][Member2], P_DATA[[playerid][Member3], P_DATA[[playerid][Member4], P_DATA[[playerid][Member5], P_DATA[[playerid][Member6], P_DATA[[playerid][Member7], P_DATA[[playerid][Member8], P_DATA[[playerid][Member9], P_DATA[[playerid][Member10], P_DATA[playerid][ClanSef]);