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

Код:
public OnPlayerConnect(playerid)
{
    new Query[250], DBResult:Result;
    format(Query, sizeof(Query), "SELECT `NAME` FROM `BANNED` WHERE `NAME` = '%s' COLLATE NOCASE", DB_Escape(PlayerName(playerid)));
    Result = db_query(BFU, Query);
    if(db_num_rows(Result))
    {
        ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ban has been detected", "Our system has detected that your name was banned.\nIf you think this is an error or mistake, visit our website.\n"WEBSITE"", "Okay", "");
        printf("%s has been kicked from OnPlayerConnect - Username ban detection", PlayerName(playerid));
		KickEx(playerid);
	}
	else
	{
	    format(Query, sizeof(Query), "SELECT `IP` FROM `BANNED` WHERE `IP` = '%s' COLLATE NOCASE", DB_Escape(PlayerIP(playerid)));
    	Result = db_query(BFU, Query);
    	if(db_num_rows(Result))
    	{
    	    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Ban has been detected", "Our system has detected that your IP was banned.\nIf you think this is an error or mistake, visit our website.\n"WEBSITE"", "Okay", "");
	        printf("%s has been kicked from OnPlayerConnect - IP ban detection", PlayerName(playerid));
	        KickEx(playerid);
    	}
    	else
    	{
    	    format(Query, sizeof(Query), "SELECT `NAME` FROM `USERS` WHERE `NAME` = '%s' COLLATE NOCASE", DB_Escape(PlayerName(playerid)));
    		Result = db_query(BFU, Query);
    		if(db_num_rows(Result))
    		{
        		ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Log-in is required", "Hello user!\nYour name has been detected as registered.\nYou are now required to log-in.\n"GREEN"Enter your password below to continue", "Login", "Leave");
    		}
    		else
    		{
        		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Registration is required", "Hello user!\nYour name has been detected as not registered.\nYou are now required to register.\n"GREEN"Enter your password below to continue", "Register", "Leave");
    		}
    	}
	}
    db_free_result(Result);

	return 1;
}
What's wrong...?
The errors are wherever ShowPlayerDialog is.
Reply
#2

pawn Код:
... \n"GREEN"Enter your ...
GREEN should be defined as:
pawn Код:
#define GREEN "{00FF00}"
instead of:
pawn Код:
#define GREEN 0x00FF00FF
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
... \n"GREEN"Enter your ...
GREEN should be defined as:
pawn Код:
#define GREEN "{00FF00}"
instead of:
pawn Код:
#define GREEN 0x00FF00FF
Ohhhh yeah how could've I forgotten that :0
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)