Noobish problem..
#1

Hey guys i am not noticeable..so i have difficult a bit here i hope you can help me
:

pawn Код:
CMD:cia(playerid,params[])
{

    if(IsPlayerInRangeOfPoint(playerid,3.0,1292.5715,-1012.6298,6645.7319) && gTeam[playerid] == TEAM_CIA) return SendClientMessage(playerid,-1,""COL_RED"ERROR:You are not at CIA lockers or you are not CIA!");
    {

    GivePlayerWeapon(playerid,29,100);

    }

    else if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIVILIAN || gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_MEDIC)
    {

    SendClientMessage(playerid,-1,""COL_RED"ERROR:You are not CIA Officer to use this command!");

    }


    return 1;
}
errors:
pawn Код:
(4272) : error 029: invalid expression, assumed zero
(4272) : warning 215: expression has no effect
(4272) : error 001: expected token: ";", but found "if"
4272 line:
pawn Код:
else if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIVILIAN || gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_MEDIC)
Reply
#2

pawn Код:
else if(gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIVILIAN || gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_MEDIC);
Reply
#3

so in else if i need to add ";" too?

EDIT:I changed it to empy "if" so it fixed it anyway it doesnt fix it by adding ;.Furthermore i think when you use else if you need to return a value.Thanks anyway.
Reply
#4

Yes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)