else if else etc.
#5

sure thing, thanks for helping .

pawn Код:
public OnPlayerFinishMission(playerid)
{
    SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
    new string[200];
    if (IsSmallAirCraftMission[playerid] == true) {
        new pname[24];
        new string[100];
        GetPlayerName(playerid,pname,24);
        format(string,sizeof(string), "%s completed %s in a dodo",pname,SmallAirCraftMissionRandom[MissionArrayID[playerid]][MissionName]);
        SendClientMessageToAll(COLOR_YELLOW,string);
    }
    else {
        new pname[24];
        new string[100];
        GetPlayerName(playerid,pname,24);
        format(string,sizeof(string), "%s completed %s in a Nevada",pname,CargoAirCraftMissionRandom[MissionArrayID[playerid]][MissionName]);
        SendClientMessageToAll(COLOR_YELLOW,string);
    }
(2287)else if {
(2288)  new pname[24];
        new string[100];
        GetPlayerName(playerid,pname,24);
        format(string,sizeof(string), "%s completed %s in a shamal",pname,PilotMissionRandom[MissionArrayID[playerid]][MissionName]);
        SendClientMessageToAll(COLOR_YELLOW,string);
    }
    return 1;
}
 
Errors:
 
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2275) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2282) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2287) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2287) : warning 215: expression has no effect
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2287) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2288) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2288) : warning 215: expression has no effect
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2288) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2288) : warning 217: loose indentation
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2288) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Hayden Bruin\Desktop\UlitmateDM\gamemodes\SAP.pwn(2288) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
else if else etc. - by Haydz - 15.11.2010, 22:13
Re: else if else etc. - by 6d - 15.11.2010, 22:24
Re: else if else etc. - by Haydz - 15.11.2010, 22:28
Re: else if else etc. - by 6d - 15.11.2010, 22:29
Re: else if else etc. - by Haydz - 15.11.2010, 22:44
Re: else if else etc. - by Jefff - 15.11.2010, 22:51
Re: else if else etc. - by 6d - 15.11.2010, 22:54
Re: else if else etc. - by Haydz - 16.11.2010, 02:30

Forum Jump:


Users browsing this thread: 1 Guest(s)