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