Login / Register problem
#1

I actually managed to fix this problem but due to a backup issue I had to revert to a VERY old version of my script and basically, when the user connects the script determine if the account exists, for some reason it says that unregistered accounts exist.

Here is the code:
pawn Код:
stock InitConnection(playerid)
{
    new Query[90], EscName[MAX_PLAYER_NAME];
    mysql_real_escape_string(pName(playerid), EscName);

    format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `username` = '%s')", EscName);
    mysql_query(Query);
    mysql_store_result();

    if(mysql_num_rows() != 0)
    {
        format(Msg, sizeof(Msg), "Please enter your password below to log onto your account\n");
        DialogPassword(playerid, LOGIN, "Account Login", Msg, "Login", "Leave");
    }
    else
    {
        format(Msg, sizeof(Msg), "This account is not registered, please enter a password below to continue\n");
        DialogPassword(playerid, REGISTER, "Account Registration", Msg, "Register", "Leave");
    }
    mysql_free_result();
}
The rest of the register / login script works fine, so the problem is here. Any ideas?
Reply


Messages In This Thread
Login / Register problem - by vIBIENNYx - 18.07.2012, 10:59
Re: Login / Register problem - by vIBIENNYx - 18.07.2012, 22:46
Re: Login / Register problem - by ReVo_ - 18.07.2012, 23:24
Re: Login / Register problem - by vIBIENNYx - 19.07.2012, 10:52

Forum Jump:


Users browsing this thread: 1 Guest(s)