SA-MP Forums Archive
Errors 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)
+--- Thread: Errors in define (/showthread.php?tid=618419)



Errors in define - Yaa - 05.10.2016

Hello !!

when i add this code to my script the pawno can't complie ( STOP RUNNING or BLOCKED smth like that )

what wrrong in those defines ?

Quote:

#define WHITE "{FFFFFF}"
#define GREEN "{00F700}"//00B000
#define BLUE "{00A3FF}"
#define RED "{E10000}"
#define ORANGE "{FF7E19}"
#define YELLOW "{FF9E00}"
#define DBLUE "{3300CC}"




Re: Errors in define - IceBilizard - 05.10.2016

PHP код:
#define WHITE 0xFFFFFFFF
#define GREEN 0x00F700FF
#define BLUE   0x00A3FFFF
#define RED     0xE10000FF
#define ORANGE  0xFF7E19FF
#define YELLOW  0xFF9E00FF
#define DBLUE 0x3300CCFF 



Re: Errors in define - Yaa - 05.10.2016

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
PHP код:
#define WHITE 0xFFFFFFFF
#define GREEN 0x00F700FF
#define BLUE   0x00A3FFFF
#define RED     0xE10000FF
#define ORANGE  0xFF7E19FF
#define YELLOW  0xFF9E00FF
#define DBLUE 0x3300CCFF 
this will work in string (format, starct ( DIALOGS) ) ?


Re: Errors in define - dusk - 05.10.2016

No, but you cannot use the same defines for both in text(inside strings) and for functions(for example SendClientMessage)


Re: Errors in define - Luicy. - 05.10.2016

#define GREEN "{00F700}"//00B000


Re: Errors in define - Yaa - 05.10.2016

still not working


Re: Errors in define - Sanady - 05.10.2016

Well this is my way of defining hex colors, but it`s the same as yours:
PHP код:
#define embed_blue               "{375FFF}"
#define embed_lblue             "{0095FF}"
#define embed_lightblue         "{00C2EC}"
#define embed_red                 "{FF0000}"
#define embed_white                "{FFFFFF}"
#define embed_green              "{33FF33}"
#define embed_yellow             "{FFFF00}"
#define embed_grey                  "{C0C0C0}"
#define embed_orange              "{FF9900}"
#define embed_pink               "{FF66FF}"
#define embed_pinkl             "{ED136A}" 
Maybe problem is coused by something else.


Re: Errors in define - dusk - 05.10.2016

Show us an example of how are you using those defines?


Re: Errors in define - IndependentGaming - 05.10.2016

use it like this

PHP код:
#define                        COLOR_GREY                            0xAFAFAFAA
#define                        COLOR_RED                            0xAA3333AA
#define                        COLOR_ORANGE                        0xFF8000FF
#define                        COLOR_YELLOW                        0xFFFF00AA
#define                        COLOR_LIGHTYELLOW                    0xFFFF91AA 
download gcp-build1 to get the 0xFFFF collors


Re: Errors in define - Yaa - 05.10.2016

FIXED !!! Thanks all !!!

++Rep Sended