PDA

View Full Version : Sending wrong messages


danielpalade
18/04/2017, 08:34 PM
-- DELETED --

LazzyBoy
18/04/2017, 08:41 PM
stock SendFootballMessage(team[], color, string[])
{
foreach(new i : Player)
{
if(team == pInfo[i][pTeamBet]) SCM(i,color,string);
}
return 1;
}

danielpalade
18/04/2017, 08:50 PM
stock SendFootballMessage(team[], color, string[])
{
foreach(new i : Player)
{
if(team == pInfo[i][pTeamBet]) SCM(i,color,string);
}
return 1;
}

That wouldn't work. "error 033: array must be indexed (variable "team")"

LazzyBoy
18/04/2017, 09:29 PM
stock SendFootballMessage(team[], color, string[])
{
foreach(new i : Player)
{
if(!strcmp(team, pInfo[i][pTeamBet)) SCM(i,color,string);
}
return 1;
}
test this , should work.

danielpalade
18/04/2017, 09:41 PM
Already fixed it. It was some problem with my variable where the name of the team was stored.