MySql Login
#1

I've decided to stop using old technology, and move up to threaded queries. I wrote my login, and when I try to log in, I get "invalid password" everytime. After looking in the log, I found the following warning:
Код:
[15:43:09] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
The code i'm trying to parse is:

pawn Код:
public OnPlayerLoginAttempt(playerid, password[])
{
    new passw[129], hash[129];
    cache_get_field_content(0, "pass", passw);
    WP_Hash(hash, sizeof(hash), password);
   
    if(!strmatch(passw, hash)) return ShowPlayerDialog(playerid, dLogin, DIALOG_STYLE_PASSWORD, "Welcome", "Welcome back!\nEnter your password below\nto login to the game.\n{ff0000}Error: Invalid Login", "Login", "");

    LoadPlayer(playerid);
    SpawnPlayer(playerid);

    return 1;
}
I tried searching the forum, though I didn't really find what I was looking for.

Obviously it means the row index is invalid, but what does that mean, how to validate it?
Reply
#2

Post you LoadPlayer code, probably something wrong in that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)