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



GetPlayerScore Error - NoahF - 26.04.2014

Hey.

Код:
if(GetPlayerScore(playerid) > 50 && < 200) //Sniper
I want to write "If the player score is greater than 50 and less than 200 then..."

How would I go about writing this code? It gives me errors when I write that.
ERRORS:
Код:
C:\Users\X\Desktop\X\gamemodes\X.pwn(1257) : error 029: invalid expression, assumed zero
C:\Users\X\Desktop\X\gamemodes\X.pwn(1257) : warning 215: expression has no effect
C:\Users\X\Desktop\X\gamemodes\X.pwn(1257) : error 001: expected token: ";", but found ")"
C:\Users\X\Desktop\X\gamemodes\X.pwn(1257) : error 029: invalid expression, assumed zero
Any help is appreciated. Thank you!


Re: GetPlayerScore Error - PrivatioBoni - 26.04.2014

new score = GetPlayerScore(playerid);

if(score > 50 && score < 200)


Try your code with an extra bracket ")" at the end before trying mine.


Re: GetPlayerScore Error - NoahF - 26.04.2014

No errors now, thank you so much!


Re: GetPlayerScore Error - PrivatioBoni - 26.04.2014

No problem & happy to help