mysql not connecting
#4

I added the mysql_debug(1); and it stopped logging anything...

Its still not saving the playerdata...

Код:
enum PlayerStats {
	Name[126],
	Password[126],
	Float: Position[3],
}
Код:
public OnPlayerDisconnect(playerid, reason)
{
	SavePlayer(playerid);
	return 1;
}
Код:
stock SavePlayer(playerid)
{
	new query[126], pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pName, sizeof(pName));
	
	GetPlayerPos(playerid, Player[playerid][Position][0], Player[playerid][Position][1], Player[playerid][Position][2]);
	
	format(query, sizeof(query), "UPDATE accounts SET Name = '%s', Password = '%s', PlayerX = '%f', PlayerY = '%f', PlayerZ = '%f' WHERE name = '%s'", pName, Player[playerid][Password], Player[playerid][Position][0], Player[playerid][Position][1], Player[playerid][Position][2], pName);
	mysql_query(query);
	printf("Player ID %d (%s)has been saved", playerid, pName);
}
I have got the database set up and the table's and structure right... But its not saving

In the database.. Should the Password and Name be a varchar or a Int?
Reply


Messages In This Thread
mysql not connecting to the Database - by Blademaster680 - 03.08.2013, 21:25
Re: mysql not connecting - by Sk1lleD - 03.08.2013, 22:37
Re: mysql not connecting - by Zex Tan - 03.08.2013, 23:48
Re: mysql not connecting - by Blademaster680 - 04.08.2013, 11:01
Re: mysql not connecting - by Sk1lleD - 04.08.2013, 11:04
Re: mysql not connecting - by Blademaster680 - 04.08.2013, 11:10

Forum Jump:


Users browsing this thread: 1 Guest(s)