Hey all what are the common problems for data leaking into other players stats for example my plugin im making that stores points will some times give the next player that joins the same points loaded for the first player. Iv rewriten my mysql part of my plugin 3 times now all using different ways to save/load data but it still leaks data. is there a reason for this and can someone explain how i can fix it.
PHP Code:
public DataLoad(client)
{
decl String:query[400], String:auth[400];
GetClientAuthId(client, AuthId_Steam3,auth, sizeof(auth));
FormatEx(query, sizeof(query), "SELECT * FROM XXXx WHERE steamid = '%s'", auth);
SQL_TQuery(hDatabase, Store_Load_Data, query, client);
}
public DataSave(client)
{
if (!IsClientInGame(client))
return;
decl String:query[400], String:auth[400], String:name[200];
GetClientName(client, name, sizeof(name));
GetClientAuthId(client, AuthId_Steam3,auth, sizeof(auth));
FormatEx(query, sizeof(query), "UPDATE XXXx SET Credits = %d, Name = '%s', Trails = %d, Tags = %d, Tier = %d WHERE steamid = '%s'", Credits[client],name,Trails[client],Tags[client], Tier[client], auth);
SQL_TQuery(hDatabase, T_Save, query, client);
}
__________________