14.08.2012, 17:08
I'm new to scripting, and I am completely stuck on "error 035: argument type mismatch (argument 4)" it comes up on my Dialog Responses.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, COLOR_WHITE, "Registering", COLOR_RED, "You have entered an incorrect password./n", COLOR_WHITE, "Type your password below to register a new account.", "Register", "Quit"); // 429
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Money",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_Close(File);
}
}
case DIALOG_LOGIN:
{
if (!response)return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX, COLOR_WHITE, "Success!", COLOR_GREEN, "You have successfully loggged in!", "Okay", "Exit"); // 449
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, COLOR_WHITE, "Login", COLOR_RED, "You have entered an incorrect password./n", COLOR_WHITE, "Type your desired password below, to login.","Login","Quit"); // 453.
}
return 1;
}
}
}
return 1;
}
Код:
C:\Users\Ian\Desktop\Development\0.3E - SCRIPT #2\gamemodes\LSCNR.pwn(429) : error 035: argument type mismatch (argument 4) C:\Users\Ian\Desktop\Development\0.3E - SCRIPT #2\gamemodes\LSCNR.pwn(449) : error 035: argument type mismatch (argument 4) C:\Users\Ian\Desktop\Development\0.3E - SCRIPT #2\gamemodes\LSCNR.pwn(453) : error 035: argument type mismatch (argument 4) C:\Users\Ian\Desktop\Development\0.3E - SCRIPT #2\gamemodes\LSCNR.pwn(471) : error 027: invalid character constant C:\Users\Ian\Desktop\Development\0.3E - SCRIPT #2\gamemodes\LSCNR.pwn(471) : error 027: invalid character constant Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.