Need some assistance
#1

I am getting some wired error and I have no clue what I have done wrong.

Here is the code:
pawn Код:
for(new p = 0; < GetMaxPlayers(); p++)
    {
        if(Class[p] == Army) count[0]++;
        else if(Class[p] == Terrorists) count[1]++;
    }
Error:
Код:
C:\Users\DarkLored123\Desktop\Server\gamemodes\Deathmatch.pwn(229) : error 029: invalid expression, assumed zero
C:\Users\DarkLored123\Desktop\Server\gamemodes\Deathmatch.pwn(229) : error 001: expected token: ")", but found ";"
C:\Users\DarkLored123\Desktop\Server\gamemodes\Deathmatch.pwn(229) : error 036: empty statement
C:\Users\DarkLored123\Desktop\Server\gamemodes\Deathmatch.pwn(229) : fatal error 107: too many error messages on one line
Reply
#2

Add the p in front of < sign, like so
Код:
for(new p = 0; p < GetMaxPlayers(); p++)
Reply
#3

He's right use this
Код:
        for(new p = 0; p < GetMaxPlayers(); p++)
	{
 		if(Class[p] == Army) count[0]++;
		else if(Class[p] == Terrorists) count[1]++;
	}
Reply
#4

Some time the error line( number) is not locate the main error line. Try to understand what error really says for. Thanks.

Reply of @Hamzajaved780 can help you .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)