SA-MP Forums Archive
mysql save accounts - 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: mysql save accounts (/showthread.php?tid=247935)



mysql save accounts - hitmany - 11.04.2011

gamemode larp
accounts save in public OnPlayerUpdateEx(playerid)
accounts have 225 parameters(PlayerInfo)

passage function
Код:
public OnPlayerUpdateEx(playerid) 
{ 
MySQLCheckConnection(); 
new query[MAX_STRING]; 
format(query, MAX_STRING, "UPDATE players SET "); 
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pKey]); //strcat connect
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "pLevel", PlayerInfo[playerid][pLevel]); 
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "pSpawn", PlayerInfo[playerid][pSpawn]); 
MySQLUpdateFinish(query, PlayerInfo[playerid][pSQLID]); 
}
get a very large request, and because of the restriction request is cut off, the server crashes
how to solve the problem?
if MAX_STRING > 2000,server crashed


Re: mysql save accounts - hitmany - 13.04.2011

any ideas?