[Help] Define
#4

pawn Код:
GetPos(%1, %2, %3, %4)
Doesn't works for this reason: The first space in a #define marks the beginning of the meaning of the macro (Can you still follow it? :P).

So right now it'll think as:
pawn Код:
Macro: GetPos(%1
Meaning: %2, %3, %4) new Float:%2, Float:%3, Float:%4; GetPlayerPos(%1, %2, %3, %4);
You'll need to place it all after eachother. Also note that a macro is used to tell the script something else then there exists, so you ARE saying "#define GetPos(blabla) GetPlayerPos(blabla);". Mention that the ";" IS in the meaning, while it IS NOT in the macro itself. Therefor, using "GetPos();" will error, as the script thinks you've got ";" place twice.

So your code should be:

pawn Код:
#define GetPos(%1,%2,%3,%4) new Float:%2, Float:%3, Float:%4; GetPlayerPos(%1, %2, %3, %4)
I hope my explanation was clear, ask questions if you have any
Reply


Messages In This Thread
[Help] Define - by Maxips2 - 16.09.2010, 14:07
Re: [Help] Define - by Maxips2 - 16.09.2010, 17:08
Re: [Help] Define - by ¤Adas¤ - 16.09.2010, 17:19
Re: [Help] Define - by Hiddos - 16.09.2010, 17:20
Re: [Help] Define - by Maxips2 - 16.09.2010, 17:35

Forum Jump:


Users browsing this thread: 1 Guest(s)