mysql ! not saving
#3

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
      new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME);
      mysql_format(mysql, query, sizeof query, "SELECT * FROM `players` WHERE `Username`='%s'", name);
      mysql_tquery(mysql, query, "SavePlayerData", "i", playerid);
      return 1;
}
you forgot onplayerdisconnect, thread the query into "SavePlayerData" function to save it when he quits game.
He wasn't even supposed to use a select statement.

You are supposed to use an UPDATE or an INSERT depending on what you're looking for.
Reply


Messages In This Thread
mysql ! not saving - by JeaSon - 18.09.2014, 10:21
Re: mysql ! not saving - by Sawalha - 18.09.2014, 11:16
Re: mysql ! not saving - by Ox1gEN - 18.09.2014, 11:28
Re: mysql ! not saving - by Sawalha - 18.09.2014, 11:53

Forum Jump:


Users browsing this thread: 1 Guest(s)