md5 hash
#5

Quote:
Originally Posted by MP2
Посмотреть сообщение
I suggest you learn to use white space and put spaces after commas, and perhaps comment too.. Looking at this gave me a headache:

pawn Код:
if(dialogid == DIALOG_LOG_PASS)
    {
        if(response)
        {
            if(strlen(inputtext) <= 0) return ShowPlayerDialog(playerid,DIALOG_LOG_PASS,DIALOG_STYLE_INPUT," ","You enter empty password/too long.\nTry again.","Enter","Cancel");
            new str[256],passch[128];
            format(str,256,"SELECT used FROM emails WHERE email='%s'",PlayerInfo[playerid][pEmail]);
            mysql_query(str);
            mysql_store_result();
            mysql_fetch_row(str);
            mysql_free_result();
            if(strval(str) != 0) return ShowPlayerDialog(playerid,DIALOG_LOG_LOG,DIALOG_STYLE_INPUT," ","Current E-mail is being used in game.\nTry another E-mail.\nIf this is mistake, contact with administator.","Enter","Cancel");
            format(str,128,"SELECT password FROM emails WHERE email='%s' LIMIT 1",PlayerInfo[playerid][pEmail]);
            mysql_query(str);
            mysql_store_result();
            mysql_fetch_row(str);
            mysql_free_result();
            md5(passch,inputtext,64); // Line 1601
            if(strcmp(str,passch,true) != 0) return ShowPlayerDialog(playerid,DIALOG_LOG_PASS,DIALOG_STYLE_INPUT," ","Wrong password for E-mail.\nTry again.","Enter","Cancel");
            format(str,256,"UPDATE emails SET used=1 WHERE email='%s'",PlayerInfo[playerid][pEmail]);
            mysql_query(str);
            Logged[playerid] = true;
            format(str,256,"SELECT driversnum FROM emails WHERE email='%s' LIMIT 1",PlayerInfo[playerid][pEmail]);
            mysql_query(str);
            mysql_store_result();
            mysql_fetch_row(str);
            mysql_free_result();
            PlayerInfo[playerid][pDriversNum] = strval(str);
            if(PlayerInfo[playerid][pDriversNum] == 0)
            {
                TextDrawShowForPlayer(playerid,Tutorial[0]);
                TextDrawShowForPlayer(playerid,Tutorial[4]);
                for(new i = 5; i < 8; i++) TextDrawShowForPlayer(playerid,Tutorial[i]);
                TutStep[playerid] = 2;
                SelectTextDraw(playerid,0x73B1EDFF);
            }
Also, it's very bad practise to half-ass something and say 'ill do it later', because you'll probably forget or never get around to it. You should use WP from the start.
Comments annoy me tho. The hash problem is fixed, replaced and done. Now I have a problem with the plugins loading, which can be seen at my post above yours.
Reply


Messages In This Thread
md5 hash - by kooltuO - 12.02.2014, 15:00
Re: md5 hash - by Vince - 12.02.2014, 15:27
Re: md5 hash - by kooltuO - 12.02.2014, 15:32
Re: md5 hash - by MP2 - 12.02.2014, 15:37
Re: md5 hash - by kooltuO - 12.02.2014, 15:38
Re: md5 hash - by MP2 - 12.02.2014, 15:49
Re: md5 hash - by kooltuO - 12.02.2014, 15:52

Forum Jump:


Users browsing this thread: 2 Guest(s)