+REP, Change ID.
#1

Sometimes changing player ID without reason. The only change in the game, not in time mysql database.
I make a debug:
Код HTML:
printf("ID: %d", pInfo[playerid][pID]);
.LOG:
Код HTML:
 ID: 48
pInfo[playerid][pID] = 1. Not 48.

Код HTML:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM players WHERE user = '%s'", GetName(playerid));
            mysql_pquery(MySQLCon, query, "OnPlayerLogin", "d", playerid);
Код HTML:
forward OnPlayerLogin(playerid);
public OnPlayerLogin(playerid)
{
    new rows, fields;
    cache_get_data(rows, fields);
    if(rows)
    {
        pInfo[playerid][pID] = cache_get_field_content_int(0, "ID");
    }
.....etc
Reply
#2

Updating sscanf and foreach helped for me.
Reply
#3

ok.. Sscanf Emmett's version?
Reply
#4

Quote:
Originally Posted by norton2
Посмотреть сообщение
ok.. Sscanf Emmett's version?
Yeah, Its the latest stable version.
Reply
#5

Ok, thank you all!
Reply


Forum Jump:


Users browsing this thread: