Problem with mysql fuel saving.
#1

I make an fuel system and in my system I can buy tanks of fuel, but if I buy it I do that: SetPVarInt(playerid,"Tanks",1); But problem this: I want to save this tanks to mysql but it doesn't. There is my code:
Код:
public OnPlayerDisconnect( playerid, reason )
{
	new tanks[30],pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pName,sizeof(pName));
	if ( Logged[ playerid ] )
	{
	   MySQLCheck();
	   format(tanks,sizeof(tanks),"UPDATE `"TABLENAME"` SET `Tanks`='%d' WHERE (`Name` = '%s')",GetPVarInt(playerid,"Tanks"),pName);
	   mysql_query(tanks);
	}
	return 1;
}
But this code doesn't save to mysql DB... And I have buoght tanks of fuel but it doesn't save it Please help me with this
Reply
#2

Check mysql_log and tanks value "30" i think it's to small. You need set "100".

pawn Код:
new tanks[100];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)