Problem with GetPlayerID
#1

hey guys .
So,I need the GetPlayerID function . so I added it in the end of the GM.(stock)
like this
Код:
stock GetPlayerID(const Name[])
{
	for(new i = 0; new max = GetMaxPlayers(); i < max; i++)
	{
	    if(IsPlayerConnected(i))
		{
  		new pName2[MAX_PLAYER_NAME];
		GetPlayerName(i, pName2, sizeof(pName2));
			if(strcmp(Name, pName2, true) ==0)
			{
			    return i;
			}
		}
	}
	return -1;
}
yep, not i got the errors.
PHP код:
(3185) : error 029invalid expressionassumed zero
(3185) : warning 204symbol is assigned a value that is never used"i"
(3185) : error 017undefined symbol "i"
(3185) : error 076syntax error in the expression, or invalid function call
(3185) : fatal error 107too many error messages on one line 
line 3185
for(new i = 0; new max = GetMaxPlayers(); i < max; i++)
Reply


Messages In This Thread
Problem with GetPlayerID - by bijoyekuza - 18.03.2011, 09:44
Re: Problem with GetPlayerID - by ricardo178 - 18.03.2011, 09:46
Re: Problem with GetPlayerID - by bijoyekuza - 18.03.2011, 09:48
Respuesta: Problem with GetPlayerID - by Sandman-x - 18.03.2011, 10:02

Forum Jump:


Users browsing this thread: 1 Guest(s)