Having problem with case.
#1

PHP код:
    if (strcmp("/Medicduty"cmdtexttrue10) == 0)
        {
            {
                if(
GetPlayerTeam(playerid) == TEAM_ME)
                    {
                        if(
IsPlayerInRangeOfPoint(playerid,5.0,-15.3097,-157.6416,1018.7024))
                        
SetPlayerSkin(playerid,274);
                    }
                    else
                    {
                        
SendClientMessage(playerid,0xE00404,"You are not in the medic loker room");
                    }
            }
            else
            {
                
SendClientMessage(playerid,0xE00404,"You are not a medic");
            }
        } 
I am having a problem in this line below
PHP код:
            else
            {
                
SendClientMessage(playerid,0xE00404,"You are not a medic");
            } 
the error is bellow
PHP код:
error 029invalid expressionassumed zero 
Please help.
Reply
#2

Yea, obviously.

pawn Код:
if (strcmp("/Medicduty", cmdtext, true, 10) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid,5.0,-15.3097,-157.6416,1018.7024)) return SendClientMessage(playerid,0xE00404,"You are not in the medic loker room");
    if(GetPlayerTeam(playerid) == TEAM_ME)
    {
        SetPlayerSkin(playerid,274);
    }
    else return SendClientMessage(playerid,0xE00404,"You are not a medic");
    return 1;
}
For all our sakes, learn to script.
Reply
#3

Quote:
Originally Posted by Kindred
Посмотреть сообщение
Yea, obviously.

pawn Код:
if (strcmp("/Medicduty", cmdtext, true, 10) == 0)
{
    if(!IsPlayerInRangeOfPoint(playerid,5.0,-15.3097,-157.6416,1018.7024)) return SendClientMessage(playerid,0xE00404,"You are not in the medic loker room");
    if(GetPlayerTeam(playerid) == TEAM_ME)
    {
        SetPlayerSkin(playerid,274);
    }
    else return SendClientMessage(playerid,0xE00404,"You are not a medic");
    return 1;
}
For all our sakes, learn to script.
There is newbies then there is you Kindred <3 be nice to the newbs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)