Problem with dialog
#1

Hi all. Here is the problem: C:\Users\Cristi\Desktop\serverul meu\gamemodes\C-Zone.pwn(386) : warning 202: number of arguments does not match definition

Line 386:
pawn Code:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,pName,"Account Login","Welcome %s!\nType your password below to login.","Login","Quit");
Here is the wrong code
Reply
#2

Try this :-
Code:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Account Login","Welcome %s!\nType your password below to login.",pName,"Login","Quit");
Reply
#3

Is not workin' same problem.
EDIT: someone have a good code pls?
Reply
#4

bump.
Reply
#5

Code:
new string[128];
format(string,sizeof(string),"Welcome %s!\nType your password below to login.",pName);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,"Login","Quit");
Reply
#6

Is not working. No error at compile but is not showing the player name.
pawn Code:
public OnPlayerConnect(playerid)
{
    new string[128],pName[24+MAX_PLAYER_NAME+1];
    if(fexist(UserPath(playerid)))
    {
        format(string,sizeof(string),"Welcome, %s\nType your password below to login.",pName);
        GetPlayerName(playerid, pName, sizeof(pName));
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Account Login",string,"Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering...","Type your password below to register a new account.","Register","Quit");
    }
    format(string,sizeof string,"If you want to know all server commands, type /help.");
    SendClientMessageToAll(0xFFFFFFAA,string);

    return 1;
}
Reply
#7

Your getting the players name after your formatting the string, switch the format and GetPlayerName function calls around.
Reply
#8

I already done that. IS NOT WORKING.
Reply
#9

why 24+ in pName?
Maybe try just having new pName[MAX_PLAYER_NAME+1]; (As recommended in the SA-MP Wiki)
Reply
#10

Quote:
Originally Posted by prooftzm
View Post
I already done that. IS NOT WORKING.
You added "string" into the dialog, which is null, and then you formatted it.
You expect that to work?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)