29.01.2011, 14:51
Hey guys. I'm trying to make a cop radio here.
The variable for the cops are : cop
My cmd:
Errors:
Error line:
The variable for the cops are : cop
My cmd:
pawn Код:
COMMAND:r(playerid,params[])
{
for(new cops;cops < MAX_PLAYERS; cops++)
{
if(cop[cops] >= 1)
{
format(string,sizeof(string),"Mechanic %s Says: %s",playername,cmdtext[3]);
SendClientMessage(cops,COLOR_BLUE,string);
}
}
return 1;
}
Код:
C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(729) : error 028: invalid subscript (not an array or too many subscripts): "cop" C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(729) : warning 215: expression has no effect C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(729) : error 001: expected token: ";", but found "]" C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(729) : error 029: invalid expression, assumed zero C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(729) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
if(cop[cops] >= 1)