Compile error D;
#4

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
COLOR_WHITE, COLOR_GREEN and COLOR_RED are defined as integer numbers. Embedding colors has to be a string instead.

pawn Код:
#define COLOR_WHITE 0xFFFFFFFF
#define COL_WHITE "{FFFFFF}"
Therefore, this is wrong:
pawn Код:
format(rank, sizeof(rank), ""COLOR_WHITE"Some text over %s", "here");
as it is basically replaced to:
Код:
format(rank, sizeof(rank), 0xFFFFFFFF"Some text over %s", "here");
Invalid syntax. The correct way will be:
pawn Код:
format(rank, sizeof(rank), ""COL_WHITE"Some text over %s", "here");
which is replaced with:
Код:
format(rank, sizeof(rank), "{FFFFFF}Some text over %s", "here");
Thanks +REP
Reply


Messages In This Thread
Compile error D; - by ZigGamerx - 11.09.2018, 09:29
Re: Compile error D; - by Florin48 - 11.09.2018, 09:58
Re: Compile error D; - by Calisthenics - 11.09.2018, 10:12
Re: Compile error D; - by ZigGamerx - 11.09.2018, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)