md5 hash
#1

(I know WP is better, but I like the way you script md5 and it will be this untill I can finally get my gamemode working)

I recently downloaded one of my old gamemodes which uses md5 and MySQL, and finally solved the MySQL problem but I have problems with MD5

Код:
(1529) : error 017: undefined symbol "md5"
(1601) : error 017: undefined symbol "md5"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

2 Errors.
Error (1529):
pawn Код:
if(dialogid == DIALOG_REG_PASS)
    {
        if(response)
        {
            if(strlen(inputtext) <= 0) return ShowPlayerDialog(playerid,DIALOG_REG_PASS,DIALOG_STYLE_INPUT," ","Entered password is empty/too long.\nEnter valid password.","Enter","Cancel");
            new str[256];
            format(str,128,"SELECT * FROM emails WHERE email='%s'",PlayerInfo[playerid][pEmail]);
            mysql_query(str),mysql_store_result();
            if(mysql_num_rows() != 0)
            {
                mysql_free_result();
                ShowPlayerDialog(playerid,DIALOG_REG_LOG,DIALOG_STYLE_INPUT," ","This E-mail is already registered. Use 'Login' instead, or enter another E-mail.","Enter","Cancel");
                return 1;
            }
            mysql_free_result();
            md5(str,inputtext,64); // Line 1529
            format(str,256,"INSERT INTO emails (email,password) VALUES('%s','%s')",PlayerInfo[playerid][pEmail],str);
            mysql_query(str);
            Logged[playerid] = true;
            for(new i = 0; i < 5; i++) TextDrawShowForPlayer(playerid,Tutorial[i]);
            SelectTextDraw(playerid,0x73B1EDFF);
            TutStep[playerid] = 1;
        }
        else
        {
            for(new i = 0; i < 5; i++) TextDrawShowForPlayer(playerid,RegLog[i]);
            SelectTextDraw(playerid,0x73B1EDFF);
            format(PlayerInfo[playerid][pEmail],128,"");
            RegOrLog[playerid] = true;
        }
        return 1;
    }
Error (1601):
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);
            }
IF anyone wants to convert this to Whirlpool, feel free to do so. You would be awesome if you did so, but is there any way to solve this?
EDIT: Whirlpool won't run on my server, which is unknown why. So fixing those errors is enough, don't know how though!
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: 3 Guest(s)