SA-MP Forums Archive
Server Crash + MySql - 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)
+--- Thread: Server Crash + MySql (/showthread.php?tid=584911)



Server Crash + MySql - andreistalker - 09.08.2015

When my server crash, it set on MySql 0 money to all players that were on server. I think is from Money Timer...


Re: Server Crash + MySql - zDivine - 09.08.2015

Did you just want to let everyone in on your thoughts or something?


Re: Server Crash + MySql - andreistalker - 09.08.2015

Code for update
Код HTML:
public updatemoney()
{
	foreach(Player, i)
	{
  		if(gLogged[i] == 1){
			new query[256];
			mysql_format(handle, query, sizeof(query), "UPDATE `conturi` SET `Cash`='%d' AND 'Level'='%d' WHERE `Nume`='%s'", P_Data[i][pLevel], P_Data[i][pLevel], GetName(i));// facem update-ul la baza de date
 			mysql_query(handle, query);
		}
	}
	return 1;
}



Re: Server Crash + MySql - MarvinPWN - 09.08.2015

You use two times pLevel, but where is pCash or something else?
Can you show us your OnPlayerDisconnect callback?