[pHelper] ? - 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: [pHelper] ? (
/showthread.php?tid=442522)
[pHelper] ? -
whando - 07.06.2013
Код:
public ReportBroadCast(color,const string[],level)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= level)
{
if(!gReports[i])
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
}
return 1;
}
works, but..
Код:
public ReportBroadCast(color,const string[],level)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= level) || PlayerInfo[i][pHelper] >= level)
{
if(!gReports[i])
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
}
return 1;
}
Won't work, why is that?
The errors:
C:\Users\Maikel\Desktop\Jamming RP\pawno\J-RP.pwn(9292
: error 029: invalid expression, assumed zero
C:\Users\Maikel\Desktop\Jamming RP\pawno\J-RP.pwn(9292
: warning 215: expression has no effect
C:\Users\Maikel\Desktop\Jamming RP\pawno\J-RP.pwn(9292
: error 001: expected token: ";", but found ")"
C:\Users\Maikel\Desktop\Jamming RP\pawno\J-RP.pwn(9292
: error 029: invalid expression, assumed zero
C:\Users\Maikel\Desktop\Jamming RP\pawno\J-RP.pwn(9292
: fatal error 107: too many error messages on one line
Re: [pHelper] ? -
StuartD - 07.06.2013
pawn Код:
public ReportBroadCast(color,const string[],level)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= level || PlayerInfo[i][pHelper] >= level)
{
if(!gReports[i])
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
}
return 1;
}
You had an extra ) in between;
[pAdmin] >= level) || PlayerInfo[i]
Hopefully that should work
Re: [pHelper] ? -
Azazelo - 07.06.2013
[QUOTE=whando;2560312]
Код:
public ReportBroadCast(color,const string[],level)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if((PlayerInfo[i][pAdmin] >= level) || (PlayerInfo[i][pHelper] >= level))
{
if(!gReports[i])
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
}
return 1;
}
Missing (
Re: [pHelper] ? -
whando - 07.06.2013
Quote:
Originally Posted by StuartD
pawn Код:
public ReportBroadCast(color,const string[],level) { for(new i = 0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >= level || PlayerInfo[i][pHelper] >= level) { if(!gReports[i]) { SendClientMessage(i, color, string); printf("%s", string); } } } } return 1; }
You had an extra ) in between;
[pAdmin] >= level) || PlayerInfo[i]
Hopefully that should work
|
Lol I didn't see that, worked, thanks
!