Requesting help with two functions. - 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)
+--- Thread: Requesting help with two functions. (
/showthread.php?tid=413868)
Requesting help with two functions. -
Magic_Time - 07.02.2013
What's wrong with the following functions:
pawn Код:
#define GiveScore(%0,%1); SetPlayerScore(%0, GetPlayerScore(%0) + %1);
#define SetPlayerSecurePos(%0,%1,%2,%3); SetPlayerPos(%0,%1,%2,%3);
Thanks.
Re: Requesting help with two functions. -
LarzI - 07.02.2013
I ask you the same thing. I can't see nothing wrong with these two macros. What's not working? Are you getting errors?
Re: Requesting help with two functions. -
MP2 - 07.02.2013
Remove the semi-colons. All 4 of them. Your function
GiveScore(playerid);
Will look like
SetPlayerScore(playerid, GetPlayerScore(playerid) + 123);;
Re: Requesting help with two functions. -
LarzI - 07.02.2013
Will it, though? The compiler will search for "GiveScore(%0,%1);" and replace it with "SetPlayerScore(%0, GetPlayerScore(%0) + %1);"
As long as he does a normal function call the function should still work fine. He only gets a problem if he tries using them as arguments in functions, which he cannot do as both these functions set something.
Re: Requesting help with two functions. -
Magic_Time - 07.02.2013
The score is no given. That's my problem. Thanks for helping me.
Also the Position is not set.