#define COLOR_BLACK 0x000000AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_GREEN 0x00FF00AA #define COLOR_RED 0xFF0000AA #define COLOR_BLUE 0x0000FFAA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_ORANGE 0xFFBB00AA #define COLOR_PURPLE 0xFF00FFAA #define COLOR_GRAY 0xAFAFAFAA #define COLOR_LIGHTBLUE 0x0AFFFFAA
format(string, 128, "COLOR_YELLOW"Welcome back "COLOR_LIGHTBLUE"%s "COLOR_WHITE"\nplease type your password below to log in.", GetName(playerid));
C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : error 017: undefined symbol "Welcome" C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : error 017: undefined symbol "back" C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : fatal error 107: too many error messages on one line
#define HEX_COLOR_YELLOW "{FFFF00}"
format(string,128,""HEX_COLOR_YELLOW"Welcome back");
So, I do have to add the "{}"'s?
I thought I saw a tutorial without having to add that. |
#define COLOR_YELLOW "0xFFFF00AA"
SendClientMessage(playerid,-1,""COLOR_YELLOW"Hi my name x");
This way you can.
pawn Код:
|
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x00FF00AA
#define STR_COLOR_BLACK "{000000}"
#define STR_COLOR_WHITE "{FFFFFF}"
#define STR_COLOR_GREEN "{00FF00}"
if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); new string[128], playerName[24]; GetPlayerName(playerid, playerName, sizeof(playerName)); format(string, sizeof(string), COLOR_YELLOW"Welcome back "COLOR_LIGHTBLUE"%s "COLOR_WHITE"\nplease type your password below to log in.", GetName(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, COLOR_WHITE"Login", string, "Login", "Quit"); }
C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : warning 215: expression has no effect C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : error 001: expected token: ";", but found "-integer value-" C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\Ruud\Documents\Samp\RP alles in 1\gamemodes\RP.pwn(194) : fatal error 107: too many error messages on one line
#define COLOR_YELLOW "{FFFF00}"
#define COLOR_YELLOW "0xFFFF00FF"
format(string, sizeof(string), ""COLOR_YELLOW"Welcome back "COLOR_LIGHTBLUE"%s\n"COLOR_WHITE"please type your password below to log in.", GetName(playerid));