Whats the difference?
#1

Whats the difference of:
pawn Код:
#define id playerid
and
pawn Код:
new id = playerid;
I was thinking on this last night before going to sleep :P
regards
Reply
#2

When you #define something, the intent is that it will be a static amount and will not change at all throughout the whole script.

Declaring a new variable is more dynamic and can be changed and reused for different values.
Reply
#3

Quote:
Originally Posted by Benjo
Посмотреть сообщение
When you #define something, the intent is that it will be a static amount and will not change at all throughout the whole script.

Declaring a new variable is more dynamic and can be changed and reused for different values.
I kinda understand.. sometimes I use
pawn Код:
new id = playerid
just as a abrevation of playerid. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)