error 001: expected token: ";", but found "-string-"
#1

I keep getting this errors
Код:
error 001: expected token: "-string end-", but found "-identifier-"
error 001: expected token: ";", but found "-string-"
warning 215: expression has no effect
for the following line

Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
any suggestions/help for this im stuck and have a feeling I need strcmp, don't not sure how I would use it
Reply
#2

Show us 2-3 lines before that line and 2-3 lines after that line.

EDIT: Before you do that, look at the post below first.
Reply
#3

If the color is defined as:
pawn Код:
#define COLOR_WHITE 0xFFFFFFFF
is wrong and it will give the errors. It should be:
pawn Код:
#define COLOR_WHITE "{FFFFFF}"
Reply
#4

Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
theres the whole public
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
If the color is defined as:
pawn Код:
#define COLOR_WHITE 0xFFFFFFFF
is wrong and it will give the errors. It should be:
pawn Код:
#define COLOR_WHITE "{FFFFFF}"
I tried that but I only got more errors
Reply
#6

try this
Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_WHITE"Login",""COLOR_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_WHITE"Registering...",""COLOR_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by D3vin
Посмотреть сообщение
I tried that but I only got more errors
The correct method is the last one I said. Although, you can use the most common one.

pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password below to login.","Login","Quit");
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The correct method is the last one I said. Although, you can use the most common one.

pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password below to login.","Login","Quit");
Thanks for your help, I just got it to work!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)