01.07.2011, 05:23
Quote:
There are any way to use defines in define? For example:
pawn Код:
|
Examples:
pawn Код:
#define RED 0xFF0000FF
#define invalidid SendClientMessage(playerid, RED, "This Player ID is not connected.");
pawn Код:
#define SetVehicleNumberPlateF(%0,%1,%2); UseBrackets\
{\
new formatstring[32];\
format(formatstring,sizeof(formatstring),%1,%2);\
SetVehicleNumberPlate(%0,formatstring);\
}
#define UseBrackets if(negative != positive)
new bool:negative = false, bool:positive = true;
But if you write the same define text into it's own define so the compiler will crash.
Example:
pawn Код:
#define fail_defined_variable fail_defined_variable //It loops around and there is no end
new fail_defined_variable;