Problem with mysql pos saving... :(
#1

I have a problem: I want to save players position then he disconnect and i made the code , but pos doesn't save. There is my code:
Код:
public OnPlayerDisconnect( playerid, reason )
{
	new pos[64],pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pName,sizeof(pName));
	new Float:pos1,Float:pos2,Float:pos3;
	if ( Logged[ playerid ] )
	{
       format(pos,sizeof(pos),"UPDATE `"TABLENAME"` SET `Position`='%d,%i,%s' WHERE (`Name` = '%s')",pos1,pos2,pos3,pName);
	   mysql_query(pos);
	}
	return 1;
}
I tried to change this: format(pos,sizeof(pos),"UPDATE `"TABLENAME"` SET `Position`='%d,%i,%s' WHERE (`Name` = '%s')",pos1,pos2,pos3,pName); to this:
Код:
     format(pos,sizeof(pos),"UPDATE `"TABLENAME"` SET `Position`='%d' WHERE (`Name` = '%s')",GetPlayerPos(playerid,pos1,pos2,pos3),pName);
And i tried to change this so much times but it doesn't work Please help me somebody. I will be very gratefuul.
Reply


Messages In This Thread
Problem with mysql pos saving... :( - by Vvolk - 11.05.2011, 10:57
Re: Problem with mysql pos saving... :( - by Sascha - 11.05.2011, 11:22
Re: Problem with mysql pos saving... :( - by Vvolk - 11.05.2011, 11:54
Re: Problem with mysql pos saving... :( - by black_dota - 11.05.2011, 12:17
Re: Problem with mysql pos saving... :( - by Vvolk - 11.05.2011, 18:54
Re: Problem with mysql pos saving... :( - by Mean - 11.05.2011, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)