Sqlite Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Sqlite Problem (
/showthread.php?tid=257946)
Sqlite Problem -
Lorenc_ - 28.05.2011
Hey guys, something seems to not be saving, im wondering why.. I set the GANGID value to -1 when player registers though when i disconnect it doesn't save. Yes, i have set a value to the GANGID later on but still no clue why this aint working.
my onplayerdisconnect:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new Query[256];
format(Query, sizeof(Query), "UPDATE `USERS` SET (`GANGID` = '%d') WHERE `NAME` = '%s'",
gPlayerData[playerid][E_GANG_ID],
ReturnPlayerName(playerid));
db_free_result(db_query(Database, Query));
return 1;
}
Anyone know what i've missed ? Thanks