[Help] Wrong Command Problem
#10

Your ranking and kills code were linked together with { and } misplaced. Here is how they should look:

pawn Код:
if(strcmp(cmd,"/ranking",true)==0)
{
  if(IsPlayerConnected(playerid))
  {
    new string[128];
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "|________________ Ranking Goals ________________|");
    format(string, sizeof(string), "** Rank 4 - Helicopter Usage: %s.", CCN[PlayerInfo[playerid][pHeligoal]]);
    SendClientMessage(playerid, COLOR_GREEN, string);
    format(string, sizeof(string), "** Rank 6 - Armour Bar: %s.", CCN[PlayerInfo[playerid][pArmourgoal]]);
    SendClientMessage(playerid, COLOR_GREEN, string);
    format(string, sizeof(string), "** Rank 8 - /Mapvis Command: %s.", CCN[PlayerInfo[playerid][pMapgoal]]);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "|_______________________________________________|");
  }
  return 1;
}
pawn Код:
if(strcmp(cmd,"/kills",true)==0)
{
  if(IsPlayerConnected(playerid))
  {
    new grkills = PlayerInfo[playerid][pGrenadekill];
    new mpkills = PlayerInfo[playerid][pMp5kill];
    new knkills = PlayerInfo[playerid][pKnucklekill];
    new string[128];
    new text1[20];
    new text2[20];
    new text3[20];
    if(PlayerInfo[playerid][pGrenadekill] == 25) { text1 = "Complete!"; } else { text1 = "Not Complete"; }
    if(PlayerInfo[playerid][pMp5kill] == 100) { text2 = "Complete!"; } else { text2 = "Not Complete"; }
    if(PlayerInfo[playerid][pKnucklekill] == 15) { text3 = "Complete!"; } else { text3 = "Not Complete"; }
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "|________________ Kills Goals ________________|");
    format(string, sizeof(string), "** %d /25 Grenades kills: %s.",grkills, text1);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "** %d /100 MP5 kills: %s.",mpkills, text2);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "** %d /15 Knuckle Duster kills: %s.",knkills, text3);
    SendClientMessage(playerid, COLOR_GOLD, string);
    SendClientMessage(playerid, COLOR_LIGHTGREEN, "|______________________________________________|");
  }
  return 1;
}
Remember that all commands should have the same number of { as } in them, if there are more or less than there should be, problems like the one you described will occur.
Reply


Messages In This Thread
[Help] Wrong Command Problem - by jamesb93 - 06.11.2009, 16:24
Re: [Help] Wrong Command Problem - by Luka P. - 06.11.2009, 16:38
Re: [Help] Wrong Command Problem - by Redgie - 06.11.2009, 17:52
Re: [Help] Wrong Command Problem - by jamesb93 - 06.11.2009, 19:19
Re: [Help] Wrong Command Problem - by Luka P. - 06.11.2009, 19:35
Re: [Help] Wrong Command Problem - by jamesb93 - 06.11.2009, 19:41
Re: [Help] Wrong Command Problem - by jamesb93 - 06.11.2009, 20:23
Re: [Help] Wrong Command Problem - by Whitetiger - 06.11.2009, 23:18
Re: [Help] Wrong Command Problem - by jamesb93 - 07.11.2009, 09:43
Re: [Help] Wrong Command Problem - by Redgie - 07.11.2009, 15:41

Forum Jump:


Users browsing this thread: 1 Guest(s)