Posts: 364
Threads: 41
Joined: Aug 2014
Reputation:
0
You can't have a formatted message inside ShowPlayerDialog, you need to use format.
Plus the error is self explanatory..
The symbol aka (var or smth else) doesn't exist, therefore it is undefined.
Make sure you have a var called username.
Posts: 553
Threads: 95
Joined: Sep 2013
Please use [pawn ]Your code/error[/pawn ]
Posts: 553
Threads: 95
Joined: Sep 2013
Try this
pawn Код:
forward DisplayDialogForPlayer(playerid,dialogid);
public DisplayDialogForPlayer(playerid, dialogid)
{
switch(dialogid)
{
case 0:
{
ShowPlayerDialog(playerid, 1,DIALOG_STYLE_PASSWORD, "{FFFFFF}Hello, Welcome to The Life of Flying We have found you are registered.\r\n[USERNAME]: {FF9900}%s{FFFFFF} - [IP]: {FF9900}%s{FFFFFF}\r\nPlease enter your password below to login.",playerid, ip,"Login","Quit");
return 1;
}
}
return 1;
}
Posts: 371
Threads: 8
Joined: Aug 2012
pawn Код:
public DisplayDialogForPlayer(playerid, dialogid)
{
switch(dialogid)
{
new string[256];
case 1:
{
format(string,sizeof(string),"Welcome to The Life of Flying We have found you are registered.\n\n[Username]: {FF9900}%s{FFFFFF} - [IP]: {FF9900}%s{FFFFFF}\n\nPlease enter your password below to login.",username(playerid), ip)
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Hello", string,"Login","Quit");
}