31.05.2012, 13:43
When logging in my server, my server crashes.
Here's the login script:
I am using Strickenkids his mysql plugin.
Error:
Anyone in the mood to help me out of this?
Thanks
Here's the login script:
pawn Код:
stock MySQL_Login(playerid)
{
GivePlayerMoney(playerid,16000);
new query[300], pname[24], savingstring[20];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT * FROM PlayerData WHERE Name = '%s'", pname);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_field(query,"|"))
{
mysql_fetch_row(savingstring, "Score"); SetPlayerScore(playerid, strval(savingstring));
mysql_fetch_row(savingstring, "PlayerLevel"); APlayerData[playerid][PlayerLevel] = strval(savingstring);
mysql_fetch_row(savingstring, "OFWarns"); APlayerData[playerid][OFWarns] = strval(savingstring);
}
mysql_free_result();
return 1;
}
Error:
Код:
[15:49:39] [MySQL] Error (0): Function: mysql_fetch_field could not find field name: "SELECT * FROM PlayerData WHERE Name = 'Entertainment'".
Thanks