Question for define
#1

Hi,

Just a small question with defining.

Lets say I define this:

#define Build "20"


Then under OnGameModeInit:

new mapname[ 100 ];
format( mapname, sizeof( mapname ), "mapname Build: "#Build"" );
SendRconCommand( mapname );



So whats the correct one?

"#Build"
or
"Build"

Thanks
Reply
#2

None of them, its just Build

Your example code would work because you put #Build there

But thats enough
pawn Код:
SendRconCommand("mapname Build: " Build);
If you put something in quotes the compiler think its a string and wont change it
"Build" and "#Build" wouldnt change at all

The # just converts the work behind it into a string
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)