BCrypt plugin issue
#1

Hi, so I have noticed an issue on my script. I'll keep it short, here's everything:

pawn Code:
Dialog:DIALOG_REGISTER(playerid, response, listitem, inputtext[])
{
    if(response)
    {
        bcrypt_hash(inputtext, BCRYPT_COST, "OnPasswordHashed", "d", playerid);
        print("Function called - DialogRegister");
    }
    else
        Kick(playerid);
    return 1;
}
I'm calling that OnPlayerConnect, and if you can notice this:

pawn Code:
bcrypt_hash(inputtext, BCRYPT_COST, "OnPasswordHashed", "d", playerid);
That's not being called.

pawn Code:
forward OnPasswordHashed(playerid);
public OnPasswordHashed(playerid)
{
    new hash[BCRYPT_HASH_LENGTH], query[300];
    bcrypt_get_hash(hash);
    mysql_format(Database, query, sizeof(query), "INSERT INTO `players` (`Username`, `Password`, `IPAddress`, `Cash`, `Kills`, `Deaths`, `Admin`, `Banned`, `LastLogin`, `LastIP`) VALUES ('%e', '%e', '%e', 0, 0, 0, 0, 0, '%e', '%e')", GetName(playerid), hash, ReturnIP(playerid), ReturnDate(), ReturnIP(playerid));
    mysql_tquery(Database, query, "OnPlayerRegister", "d", playerid);
    print("Function called - OnPasswordHashed");
    return 1;
}
I have tried to debug it and noticed it's not being called.
Reply
#2

Fixed after including BCrypt after crashdetect, which means as the second plugin. I don't know why but that worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)