24.08.2011, 11:30
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == "*") //Error line
{
if(Team[playerid] == TEAM_BLUE)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && Team[i] == TEAM_BLUE || GetPVarInt(i,"VIP") == 1 || GetPVarInt(i,"Admin") == 1)
{
new string[128];
new name[24];
GetPlayerName(playerid,name,24);
format(string,128,"[BLUE TEAM CHAT]%s [ID:%d]: %s",name,playerid,text[1]);
SendClientMessage(i,grey,string);
return 0;
}
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && Team[i] == TEAM_RED || GetPVarInt(i,"VIP") == 1 || GetPVarInt(i,"Admin") == 1)
{
new string[128];
new name[24];
GetPlayerName(playerid,name,24);
format(string,128,"[RED TEAM CHAT]%s [ID:%d]: %s",name,playerid,text[1]);
SendClientMessage(i,grey,string);
return 0;
}
}
}
return 1;
}
Код:
cod5.pwn(209) : error 033: array must be indexed (variable "-unknown-")