4-digits, how to count?
#1

Hello, I'm making a bank script, I now have a problem with the password creation.

First of all, how to check the amount of digits?
Second of all, why does it set my password to 54 when I wrote 646589865?

pawn Код:
if(dialogid == 5)
    {
        if(!response)
        {
            ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Las Venturas Bank","Bank Selection Aborted","Exit","Exit");
            dini_Remove(Bankfile(PlayerInfo[playerid][pBankcreate]));
            return 1;
        }
        if(!IsNumeric(inputtext[0])) return ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"Las Venturas Bank","You must type a 4-digit password","Continue","Cancel");
        if(inputtext[0] < 4 && inputtext[0] > 4) return ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"Las Venturas Bank","You must type a 4-digit password","Continue","Cancel");
        dini_IntSet(Bankfile(PlayerInfo[playerid][pBankcreate]),"Password",inputtext[0]);
        new text[128];
        format(text,sizeof(text),"Congratulations! Your bank account has been successfully created with the Account ID: %d and Password: %d.",PlayerInfo[playerid][pBankcreate],inputtext[0]);
        ShowPlayerDialog(playerid,6,DIALOG_STYLE_MSGBOX,"Las Venturas Bank",text,"Finish","Exit");
        return 1;
    }
Reply


Messages In This Thread
4-digits, how to count? - by introzen - 19.12.2010, 17:32
Re: 4-digits, how to count? - by MadeMan - 19.12.2010, 17:59
Re: 4-digits, how to count? - by Jochemd - 19.12.2010, 17:59
Re: 4-digits, how to count? - by introzen - 19.12.2010, 20:38

Forum Jump:


Users browsing this thread: 1 Guest(s)