#1

Hi Guyz,I am making a login dialog box,Getting these errors,My Code
Код:
new str[128], pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pname,sizeof(pname));
	format(str, sizeof(str), ""COLOR_SILVER" Welcome back, %s! \n Type your password into the box below to login.\n If you have not yet registered,Please join \n with another username - this one is taken!", pname);
	ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",str,""COL_WHITE"Login","Quit");
Screenshot:

316 line is :
Код:
format(str, sizeof(str), ""COLOR_SILVER" Welcome back, %s! \n Type your password into the box below to login.\n If you have not yet registered,Please join \n with another username - this one is taken!", pname);
Reply
#2

Show your define for COLOR_SILVER.
Reply
#3

Quote:

"COLOR_SILVER"

this caused the fuck up in your line as you've messed up with the compiler, opened a come then closed then opened then closed, you pissed the compiler off, If you want a custom color for this word, I guess you should use hex codes and surround the code with a bracket like this "{}" ex: "{FFFFFF} HI {FFFFFF}" i guess that explains much.
Reply
#4

Yes,It was COLOR Problem,Solved!
Reply
#5

If you want to use defines for embedded colours you simply need to define a different version of each colour with the embedding string. I use an EC_ prefix (embedded colour) for example:

#define EC_SILVER “{CCCCCC}”

You can then use this define as you did above.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)