Requesting help with two functions.
#1

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.
Reply
#2

I ask you the same thing. I can't see nothing wrong with these two macros. What's not working? Are you getting errors?
Reply
#3

Remove the semi-colons. All 4 of them. Your function

GiveScore(playerid);

Will look like

SetPlayerScore(playerid, GetPlayerScore(playerid) + 123);;
Reply
#4

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.
Reply
#5

The score is no given. That's my problem. Thanks for helping me.
Also the Position is not set.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)