01.09.2011, 18:28
hi,
saving on disconnect and registring works fine and is inserted into the right table but as soon as a already registered player trys to log in it fails.
Well, the password also works, cause when i enter the right password on login it says login successful and it proceeds.
But it fails when it comes to the other data.
The log says:
This is the code:
help would be great 
//edit: +Reps for people that help me
saving on disconnect and registring works fine and is inserted into the right table but as soon as a already registered player trys to log in it fails.
Well, the password also works, cause when i enter the right password on login it says login successful and it proceeds.
But it fails when it comes to the other data.
The log says:
Код:
mysql_fetch_field could not find field name "NULL".
pawn Код:
new query[1400], pname[24], savingstring[1400];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT Score, Money, Kills, Deaths, Admin FROM Users WHERE name = '%s'", pname);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(query,"|");
{
mysql_fetch_field(savingstring, "Score"); SetPlayerScore(playerid, strval(savingstring));
mysql_fetch_field(savingstring, "Money"); MoneyCash[playerid] = strval(savingstring);
mysql_fetch_field(savingstring, "Kills"); kills[playerid] = strval(savingstring);
mysql_fetch_field(savingstring, "Deaths"); deaths[playerid] = strval(savingstring);
mysql_fetch_field(savingstring, "Admin"); Player[playerid][AdminLevel] = strval(savingstring);
//...
}
mysql_free_result();

//edit: +Reps for people that help me
