Im having a problem
#1

Hello i have a warning

warning 202: number of arguments does not match definition

and the code is

Код:
public OnPlayerConnect(playerid)
{
	new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,24);
    new Y, M, D;
    new H, G, S;
    getdate(Y, M, D);
    gettime(H, G, S);
    if(fexist(Path(playerid)))
    {
        INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back %s. This account is registered. \nInsert your password to login to your account","Login","Quit",pName);
    }
    else 
    {
        ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.","Register","Quit");
		return 1;
  	}
   	return 1;
}
I don't understan whats not working there.
Reply
#2

Which line is it?
Reply
#3

ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPU T,"Login","Welcome back %s. This account is registered. \nInsert your password to login to your account","Login","Quit",pName);
Reply
#4

you can't format a string inside ShowPlayerDialog.
Код:
format(string, sizeof(string), "Welcome back %s. This account is registered. Insert your password to login to your account", pName);
ShowPlayerDialog(playerid, dlogin, DIALOG_STYLE_INPUT, "Login", string, "Login", "Quit");
Reply
#5

but it worked before i added pName

now it shows 5 errors
Reply
#6

Quote:
Originally Posted by RuNBoY
Посмотреть сообщение
but it worked before i added pName

now it shows 5 errors
How Lucam posted, is how you should go about it.

Post up your 5 errors, as they may not be related to this issue.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)