warning 209: return value
#10

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmd, "/911", true) == 0)
    {
    if(IsSpawned[playerid] == 0)
     {
        SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
        return 1;
     }
    if(Jailed[playerid] ==1)
     {
        SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
        return 1;
     }
    if(InDerby[playerid] == 1)
     {
        SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command while you are in the stadium");
         return 1;
     }
    if(gTeam[playerid] <= 2)
     {
        SendClientMessage(playerid,COLOR_ERROR,"You are a Law Enforcement officer. You cannot call /911 ");
        return 1;
     }
    if (!GetPlayersInTeam(TEAM_COPS))
     {
        SendClientMessage(playerid,COLOR_ERROR,"There are no Police officers in the area");
        return 1;
     }

    new output[70];
    strmid(output,cmdtext,5,strlen(cmdtext));

    if(strlen(cmdtext) <= 4)
     {
        SendClientMessage(playerid, 0xA9A9A9AA, "USAGE: /911 (message)");
        return 1;
     }

    SendClientMessage(playerid, 0xA9A9A9AA, "|_Dialed 911_|");
    SendClientMessage(playerid,0x00C7FFAA,"You have dialed 911 - Please wait for Police assistance");
    new callername[30];
    GetPlayerName(playerid,callername, 30);
    new current_zone;
    current_zone = player_zone[playerid];

    for(new i=0;i<MAX_PLAYERS;i++)
      {
      if(LawEnforcementRadio[i] == 1)
        {
          format(string, sizeof(string), "DISPATCH: (911) %s(%d) has called 911",callername,playerid);
          SendClientMessage(i,COLOR_ROYALBLUE,string);
          format(string, sizeof(string), "%s(%d) Said: ( %s )",callername,playerid,output);
          SendClientMessage(i,COLOR_ROYALBLUE,string);
          format(string, sizeof(string), "All units in the area please respond. Location: %s",zones[current_zone][zone_name]);
          SendClientMessage(i,COLOR_ROYALBLUE,string);
          return 1;
        }
      }
    }
  return 0;
}
I am not saying you code is right but I had to look through the indentions.

[EDIT] I just seen the rest of that code you posted sorry mate but I am not gonna search through that also. If I was you I would look at the layout of your code its hard to read mate and must be for you.
Reply


Messages In This Thread
warning 209: return value - by SuperS0nic - 04.02.2009, 18:16
Re: warning 209: return value - by SilentMouse - 04.02.2009, 18:20
Re: warning 209: return value - by Auto-Sized - 04.02.2009, 18:21
Re: warning 209: return value - by SuperS0nic - 04.02.2009, 18:24
Re: warning 209: return value - by Hypo - 04.02.2009, 18:40
Re: warning 209: return value - by yom - 04.02.2009, 18:41
Re: warning 209: return value - by SuperS0nic - 04.02.2009, 18:42
Re: warning 209: return value - by yom - 04.02.2009, 18:43
Re: warning 209: return value - by SuperS0nic - 04.02.2009, 18:43
Re: warning 209: return value - by Auto-Sized - 04.02.2009, 18:59

Forum Jump:


Users browsing this thread: 3 Guest(s)