Erros in my stock? (Urgent) - 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: Erros in my stock? (Urgent) (
/showthread.php?tid=411472)
Erros in my stock? (Urgent) -
Goldino - 29.01.2013
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
Re: Erros in my stock? (Urgent) -
Bakr - 29.01.2013
pawn Код:
if(pInfo[i][Adminlevel] < 1)
You should probably also make it check if their level is
greater than 1.
Re: Erros in my stock? (Urgent) -
Glad2BeHere - 29.01.2013
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