Erros in my stock? (Urgent)
#1

Hey guys, I have this error:

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(714) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And here is the stock which the error is in:

Код:
stock MessageToAdmins(color, const string[])
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
	if(IsPlayerConnected(i))
	{
	   if(pInfo[playerid][Adminlevel] < 1)
	   {
		 SendClientMessage(i, color, string);
	   }
	}
  }
  return 1;
}
Please help! Thanks
Reply
#2

pawn Код:
if(pInfo[i][Adminlevel] < 1)
You should probably also make it check if their level is greater than 1.
Reply
#3

pawn Код:
stock MessageToAdmins(color, admlvl, string[])
{
    foreach(Player, i)
    {
        if(pInfo[i][Adminlevel] >= admlvl)
        {
            SendClientMessage(i, color, string);
        }
    }
    return 1;
}

new string[256];
format(string, sizeof(string), "hi");
MessageToAdmins(color u want, admin level required to see it, string);
MessageToAdmins(-1, 5,string); so u need atleast level 5 admin to see the string
also please the foreach its more simple
https://sampforum.blast.hk/showthread.php?tid=92679%29
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)