Unable +rep
#1

pawn Код:
public DisplayDialogForPlayer(playerid, dialogid)
{
    switch(dialogid)
    {
        case 1:
        {
            [B][I]ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Hello, 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,"Login","Quit");[/I][/B]
        }
E:\Main\Life of Flying 0.3x (1)\Life of Flying 0.3x\gamemodes\LoF.pwn(16625) : error 017: undefined symbol "username"
Reply
#2

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.
Reply
#3

Please use [pawn ]Your code/error[/pawn ]
Reply
#4

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;
 
}
Reply
#5

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");
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)