PDA

View Full Version : Whirpool


CSSI
11/10/2011, 01:19 PM
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)

Wesley221
11/10/2011, 01:21 PM
An whirlpooled hash, isnt an integer. It contains 128 characters, which can be anything. Use INI_WriteString, instead of INI_WriteInt

CSSI
11/10/2011, 01:22 PM
Thanks :)