SA-MP Forums Archive
Whirpool - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Whirpool (/showthread.php?tid=289398)



Whirpool - CSSI - 11.10.2011

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == 1)
        {
                if (!response) return Kick(playerid);
                new str[128],string[128],hash[128];
                format(string,sizeof(string),""Green"Account: %s\n\n"GreenYellow"This Account is Not registered\nPlease enter Your password To Register a new Account",GetName(playerid));
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1,DIALOG_STYLE_INPUT,"Register",string,"Register","Quit");
                if(response)
                {
                    WP_Hash(hash,sizeof(hash),inputtext);
                    new INI:File = INI_Open(UserPath(playerid));
                    INI_SetTag(File,"data");
                    INI_WriteInt(File,"Password",hash);
                    INI_WriteInt(File,"Cash",0);
                    INI_WriteInt(File,"Admin",0);
                    INI_WriteInt(File,"Kills",0);
                    INI_WriteInt(File,"Deaths",0);
                    INI_WriteInt(File,"Score",0);
                    INI_WriteInt(File,"Regular",0);
                    INI_WriteInt(File,"BankMoney",0);
                    INI_Close(File);
                    Logged[playerid] = 1;
                    format(str,sizeof(str),""GreenYellow"Nickname - %s\nPassword - %s",GetName(playerid),inputtext);
                    ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"Info",str,"Ok","");
                }

        }
error 035: argument type mismatch (argument 3)



Re: Whirpool - Wesley221 - 11.10.2011

An whirlpooled hash, isnt an integer. It contains 128 characters, which can be anything. Use INI_WriteString, instead of INI_WriteInt


Re: Whirpool - CSSI - 11.10.2011

Thanks