SA-MP Forums Archive
4 errors in one line - 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: 4 errors in one line (/showthread.php?tid=359821)



4 errors in one line - Mr.1337 - 15.07.2012

i get 4 errors in this line

Код:
 if( >= 2 || playerid == MAX_PLAYERS)
errors:

Код:
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line



Re: 4 errors in one line - Faisal_khan - 15.07.2012

What are you checking greater than 2? It must be written there like
pawn Код:
if(GetPlayerRank >= 2 || playerid == MAX_PLAYERS)



Re: 4 errors in one line - Mr.1337 - 15.07.2012

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
What are you checking greater than 2? It must be written there like
pawn Код:
if(GetPlayerRank >= 2 || playerid == MAX_PLAYERS)
21 errors when compiling


Re: 4 errors in one line - leonardo1434 - 15.07.2012

It should looks like this.
pawn Код:
if(somecondition >=2)  // it should be like this.

//about this...
playerid = MAX_PLAYERS; // you're doing wrong, playerid is just the ID of the player.see below a simple example of what you're trying to do.

X = 500; // x means the id of the playerid, so it could be between 0 - 500.