SA-MP Forums Archive
Warning in Define - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Warning in Define (/showthread.php?tid=81575)



Warning in Define - shark - 12.06.2009

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!


Re: Warning in Define - dice7 - 12.06.2009

0xCCFF66AA is not a valid color code


Re: Warning in Define - yom - 12.06.2009

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.


Re: Warning in Define - dice7 - 12.06.2009

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'


Re: Warning in Define - shark - 12.06.2009

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.


Re: Warning in Define - Karlip - 12.06.2009

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.


Re: Warning in Define - Donny_k - 12.06.2009

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")




Re: Warning in Define - shark - 12.06.2009

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