03.05.2015, 02:04
pawn Код:
[21:01:48] [MySQL] Error (0): Failed to store result.
[21:01:48] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored.
pawn Код:
if(dialogid == 35)
{
if(response)
{
if(!strlen(inputtext)) //If the player doesn't enter a pass
{
ShowPlayerDialog(playerid, 35, DIALOG_STYLE_PASSWORD , "Register", "This account is not registered, please register!", "OK", "Cancel");
SendClientMessage(playerid, 0xF60000AA, "Please enter a password");
}
new field[256];
new query[500];
new escpname[24], escpass[100];
mysql_real_escape_string(inputtext, escpass );
mysql_real_escape_string(gPlayerInfo[playerid][pName], escpname);
format(query, sizeof(query),"INSERT INTO `playerinfo` (`user`,`password`,`IP`,`date`) VALUES ('%s',%d,'%s',UTC_TIMESTAMP())",
escpname,udb_hash(escpass),gPlayerInfo[playerid][pIp],gettime());
mysql_query(query);
mysql_store_result();
format(query, sizeof(query),"SELECT `id` FROM `playerinfo` WHERE `user`='%s' LIMIT 1",escpname);
mysql_fetch_int("id",gPlayerInfo[playerid][pDBID]);
mysql_query(query);
mysql_store_result();
GameTextForPlayer(playerid,"~g~Registered",2000,3);
SendClientMessage(playerid,0x0000D9AA,"Registered and Logged into your account!");
gPlayerInfo[playerid][pLogged]=1;
}
}
can someone help me with this?
when i try to register the player only registre the date
and this cmd shows
pawn Код:
[21:01:48] [MySQL] Error (0): Failed to store result.
[21:01:48] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored.