Help Macros
#1

I was looking around for macros code.

I dont understand yet for what its used for.
Can someone explain me when and how it can be used?
Reply
#2

It's similar to a function.

PHP код:
#define sum(%0, %1) (%0 + %1) 
PHP код:
stock sum(ab)
{
    return 
b;

Reply
#3

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
It's similar to a function.

PHP код:
#define sum(%0, %1) (%0 + %1) 
PHP код:
stock sum(ab)
{
    return 
b;


Those functions are both same?
Reply
#4

Yess
Reply
#5

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
It's similar to a function.

PHP код:
#define sum(%0, %1) (%0 + %1) 
PHP код:
stock sum(ab)
{
    return 
b;

Wrong, as ****** said, put the params always in ()
So your
pawn Код:
#define sum(%0, %1) (%0 + %1)
Should be
pawn Код:
#define sum(%0, %1) ((%0) + (%1))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)