Medic Radio Message problems
#6

I managed to fix errors, yes there's another missing bracket then i add it,

Updated code:

Quote:

if(strcmp("/mm", cmdtext, true, 3) == 0)
{
new string[128];
if(IsSpawned[playerid] == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
return 1;
}
if(gTeam[playerid] == Medic)
{
SendClientMessage(playerid,COLOR_ROYALBLUE,"You are not a Medic!");
}
if(strlen(cmdtext) <= 4)
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /mm [Medic Message]");
return 1;
}
else
{
new output[255];
new pname[24];
GetPlayerName(playerid, pname, 24);
strmid(output,cmdtext,3,strlen(cmdtext));
format(string, sizeof(string), "[MEDIC RADIO] - %s (%d): %s",pname,playerid,output);
printf("%s", string);
for(new i=0;i<MAX_PLAYERS;i++)
}
if(gTeam[i] == Medic)

{
format(string, sizeof(string), "[MEDIC RADIO] - %s (%d): %s",pname,playerid,output);
SendClientMessage(i,COLOR_ROYALBLUE,string);
}
}
return 1;
}

4 errors left

Quote:

C:\Users\USER\Desktop\SERVERSKCNR\gamemodes\CNR.pw n(5167) : error 029: invalid expression, assumed zero
C:\Users\USER\Desktop\SERVERSKCNR\gamemodes\CNR.pw n(5167 -- 516 : warning 215: expression has no effect
C:\Users\USER\Desktop\SERVERSKCNR\gamemodes\CNR.pw n(516 : error 001: expected token: ";", but found "if"
C:\Users\USER\Desktop\SERVERSKCNR\gamemodes\CNR.pw n(516 : error 017: undefined symbol "i"
C:\Users\USER\Desktop\SERVERSKCNR\gamemodes\CNR.pw n(516 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

The errors came from this

5167: }
5168: if(gTeam[i] == Medic)

}
if(gTeam[i] == Medic)
{
Reply


Messages In This Thread
Medic Radio Message problems - by Uberanwar - 21.07.2013, 03:03
Re: Medic Radio Message problems - by Don_Cage - 21.07.2013, 03:37
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 03:41
Re: Medic Radio Message problems - by Don_Cage - 21.07.2013, 03:55
Re: Medic Radio Message problems - by PrinceKumar - 21.07.2013, 04:21
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 04:29
Re: Medic Radio Message problems - by PrinceKumar - 21.07.2013, 04:39
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 06:11
Re: Medic Radio Message problems - by mahdi499 - 21.07.2013, 06:35
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 12:52

Forum Jump:


Users browsing this thread: 5 Guest(s)