Warning in Define
#1

Hello,

I've some warning that I can't fix.

Here it is:

Код:
C:\Pawno\gamemodes\teste.pwn(90) : warning 201: redefinition of constant/macro (symbol "COLOR_JOB60")
The line 90:

Код:
#define COLOR_JOB60  0xCCFF66AA
It's just the color definition of the JOB60, and I don't know what is wrong.
Someone can help me?

Thanks!
Reply
#2

0xCCFF66AA is not a valid color code
Reply
#3

Quote:
Originally Posted by dice7
0xCCFF66AA is not a valid color code
I don't see what's wrong with it.

The problem, as the warning clearly explain, is that you already have a "#define COLOR_JOB60" somewhere before line 90.
Reply
#4

Quote:
Originally Posted by 0rb
Quote:
Originally Posted by dice7
0xCCFF66AA is not a valid color code
I don't see what's wrong with it.
I tested it before posting my reply. And if he would have two definitions with COLOR_JOB60 in it, he would get an error like 'symbol already defined'
Reply
#5

Quote:
Originally Posted by dice7
Quote:
Originally Posted by 0rb
Quote:
Originally Posted by dice7
0xCCFF66AA is not a valid color code
I don't see what's wrong with it.
I tested it before posting my reply. And if he would have two definitions with COLOR_JOB60 in it, he would get an error like 'symbol already defined'
Yeah, that's correctly. If the COLOR_JOB60 already exist, the error will be 'symbol already defined'.a
And 0xCCFF66AA, it is a valid color. Why it isn't?

I already try to use another colors, but won't work.
Reply
#6

No,read it again,it says 'redefinition',which means that it's been defined twice in the script.

Search for another
pawn Код:
#define COLOR_JOB60
in the script,you might find one.
Reply
#7

The hex value is perfectly fine (0xCCFF66AA), it's the name, so rename it.

pawn Код:
#define TEST 0
#define TEST 1
Quote:

warning 201: redefinition of constant/macro (symbol "TEST")

Reply
#8

Quote:
Originally Posted by Karlip
No,read it again,it says 'redefinition',which means that it's been defined twice in the script.

Search for another
pawn Код:
#define COLOR_JOB60
in the script,you might find one.
Ok, I got!

Thank you guyz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)