Need help with changepass cmd (mysql,whirlpool)
#17

I still can't get forward with this matter. Always the same error:

Код:
[17:46:44] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `users` SET `pass`='D5FBADCC1D96C6A3B676186562457AE055C03", callback: "query", format: "(null)"
[17:46:44] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[17:46:44] [DEBUG] mysql_tquery - scheduling query "UPDATE `users` SET `pass`='D5FBADCC1D96C6A3B676186562457AE055C03568CDCA527459E6C42C9A89D93E1269D2B09E9E0AE9335B7FC8F234CDBC542DDDFA936BFFD781FA53E8B7CD1A93', `salt`='2249ylqI1902MW91auv9EhT9590AF8D5FBADCC1D96C6A3B676186562457AE055C03568CDC"..
[17:46:44] [DEBUG] CMySQLQuery::Execute[query()] - starting query execution
[17:46:44] [ERROR] CMySQLQuery::Execute[query()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2249ylqI1902MW91auv9EhT9590AF8D5FBADCC1D96C6A3B676186562457AE055C03568CDC' at line 1
My code looks like this now:
pawn Код:
CMD:changepass(playerid, params[])
{
    if (gPlayerInfo[playerid][pLogged] == 0)
        return SendClientMessage( playerid, -1, "You need to be logged in to use this. " );
    new newpass[129];
    if(sscanf(params, "s[128]", newpass))
        return SendClientMessage( playerid, -1, "USAGE: /changepass [New password]. " );
    if (strlen(params) > 90)
        return SendClientMessage(playerid, -1, "Password has to be between 1 and 90 characters.");
    new Salt[30];
    randomString(Salt, SALT_LENGTH);
    WP_Hash(newpass, 129, newpass);
    format(newpass, sizeof(newpass), "%s", (newpass));
    new query[240];
    format(query, sizeof(query), "UPDATE `users` SET `pass`='%s', `salt`='%s' WHERE `id`='%i'", newpass, Salt, gPlayerInfo[playerid][pID]);
    mysql_function_query(gHandle, query, false, "query", "", "", "");
    SendClientMessage(playerid, -1, "You have successfully changed your password.");
    SendClientMessage(playerid, -1, "Password changed.");
    return 1;
}
Help please
Reply


Messages In This Thread
Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 14:24
Re: Need help with changepass cmd (mysql,whirlpool) - by Stinged - 01.11.2014, 14:32
Respuesta: Need help with changepass cmd (mysql,whirlpool) - by Cerealguy - 01.11.2014, 14:40
Re: Respuesta: Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 17:08
Re: Need help with changepass cmd (mysql,whirlpool) - by gtakillerIV - 01.11.2014, 17:48
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 18:53
Re: Need help with changepass cmd (mysql,whirlpool) - by gtakillerIV - 01.11.2014, 19:00
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 19:44
Re: Need help with changepass cmd (mysql,whirlpool) - by Stinged - 02.11.2014, 07:02
Re: Need help with changepass cmd (mysql,whirlpool) - by Stinged - 02.11.2014, 15:07
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 02.11.2014, 17:58
Re: Need help with changepass cmd (mysql,whirlpool) - by [HiC]TheKiller - 02.11.2014, 19:12
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 03.11.2014, 19:47
Re: Need help with changepass cmd (mysql,whirlpool) - by Runn3R - 03.11.2014, 20:13
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 03.11.2014, 20:22
Re: Need help with changepass cmd (mysql,whirlpool) - by [HiC]TheKiller - 03.11.2014, 22:49
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 09.11.2014, 14:56
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 09.11.2014, 17:08

Forum Jump:


Users browsing this thread: 2 Guest(s)