SA-MP Forums Archive
MySql Login - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySql Login (/showthread.php?tid=537326)



MySql Login - TakeiT - 14.09.2014

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?


Re: MySql Login - MikeEd - 15.09.2014

Post you LoadPlayer code, probably something wrong in that