SA-MP Forums Archive
Having problem with case. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Having problem with case. (/showthread.php?tid=362450)



Having problem with case. - TaLhA XIV - 24.07.2012

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.


Re: Having problem with case. - Kindred - 24.07.2012

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.


Re: Having problem with case. - Akira297 - 24.07.2012

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.