SA-MP Forums Archive
SetPlayerScore. - 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: SetPlayerScore. (/showthread.php?tid=323655)



SetPlayerScore. - Blunt - 06.03.2012

I need some help with SetPlayerScore,

I've written this function into my script, it has a payday system everyhour so I wrote this.

**Line 7461** SetPlayerScore(playerid, +-); - Which would hopefully +1 to your score when that callback is activated, such as PayDay function.

Unfortunately i'm getting these errors,

Код:
C:\Users\Mike\Desktop\Script\gamemodes\PS-RP.pwn(7461) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: SetPlayerScore. - Twisted_Insane - 06.03.2012

What about this?

pawn Код:
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);



Re: SetPlayerScore. - Blunt - 06.03.2012

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
What about this?

pawn Код:
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
That looks familiar to a Kill/score system, mines for a Timer activated function which does not contain a "killerid"


Re: SetPlayerScore. - Konstantinos - 06.03.2012

Then replace the killerid to the variable name you are using to the loop on the timer's Callback.


Re: SetPlayerScore. - aco_SRBIJA - 06.03.2012

try ++


Re: SetPlayerScore. - Campbell- - 06.03.2012

pawn Код:
new score = GetPlayerScore(playerid)++;
SetPlayerScore(playerid, score);



Re: SetPlayerScore. - DarkScripter - 06.03.2012

pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);