Help Macros - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help Macros (
/showthread.php?tid=271292)
Help Macros -
TheArcher - 23.07.2011
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?
Re: Help Macros -
MoroDan - 23.07.2011
It's similar to a function.
PHP код:
#define sum(%0, %1) (%0 + %1)
PHP код:
stock sum(a, b)
{
return a + b;
}
Re: Help Macros -
TheArcher - 23.07.2011
Quote:
Originally Posted by MoroDan
It's similar to a function.
PHP код:
#define sum(%0, %1) (%0 + %1)
PHP код:
stock sum(a, b)
{
return a + b;
}
|
Those functions are both same?
Re: Help Macros -
MoroDan - 23.07.2011
Yess
Re: Help Macros -
FireCat - 24.07.2011
Quote:
Originally Posted by MoroDan
It's similar to a function.
PHP код:
#define sum(%0, %1) (%0 + %1)
PHP код:
stock sum(a, b)
{
return a + 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))