Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error (
/showthread.php?tid=640713)
Error -
MadGuy - 06.09.2017
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);
Re: Error -
Kane - 06.09.2017
Show your define for COLOR_SILVER.
Re: Error -
JasonRiggs - 06.09.2017
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.
Re: Error -
MadGuy - 06.09.2017
Yes,It was COLOR Problem,Solved!
Re: Error -
MP2 - 07.09.2017
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.