Problem with dialog -
prooftzm - 13.08.2014
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
Re: Problem with dialog -
Phyzic - 13.08.2014
Try this :-
Code:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Account Login","Welcome %s!\nType your password below to login.",pName,"Login","Quit");
Re: Problem with dialog -
prooftzm - 13.08.2014
Is not workin'
same problem.
EDIT: someone have a good code pls?
Re: Problem with dialog -
prooftzm - 13.08.2014
bump.
Respuesta: Problem with dialog -
Cepillado - 13.08.2014
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");
Re: Problem with dialog -
prooftzm - 13.08.2014
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;
}
Re: Problem with dialog -
wooolly - 13.08.2014
Your getting the players name after your formatting the string, switch the format and GetPlayerName function calls around.
Re: Problem with dialog -
prooftzm - 13.08.2014
I already done that. IS NOT WORKING.
Re: Problem with dialog -
wooolly - 13.08.2014
why 24+ in pName?
Maybe try just having new pName[MAX_PLAYER_NAME+1]; (As recommended in the SA-MP Wiki)
Re: Problem with dialog -
Stinged - 13.08.2014
Quote:
Originally Posted by prooftzm
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?