SA-MP Forums Archive
Getting an empty statement error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting an empty statement error (/showthread.php?tid=140259)



Getting an empty statement error - biltong - 08.04.2010

pawn Код:
public HasPlayerLeft(playerid)
{
    if(Jailed[playerid])
    {
        if(!IsPlayerInRangeOfPoint(playerid, 20, 197.35707092285, 173.41456604004, 1002.672668457))
        {
            new name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            printf("Player %s tried to escape from jail, putting him/her back.", name);
            new rand = random(2);
            SetPlayerPos(playerid, RandomJail[rand][0], RandomJail[rand][1], RandomJail[rand][2]);
            SetPlayerInterior(playerid, 3);
            SendClientMessage(playerid, 0xFF3300FF, "You can't escape from jail!");
        }
    }
    else if(Caged[playerid])
    {
      if(!IsPlayerInRangeOfPoint(playerid, 5, x[playerid], y[playerid], z[playerid])); //this line give me an empty statement error
      {
        new name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            printf("Player %s tried to escape from his/her cage, putting him/her back.", name);
            SetPlayerPos(playerid, x[playerid], y[playerid], z[playerid]);
            SendClientMessage(playerid, 0xFF3300FF, "You can't escape from your cage!");
        }
    }
}
Why?


Re: Getting an empty statement error - Babul - 08.04.2010

its the semicolon
Код:
		if(!IsPlayerInRangeOfPoint(playerid, 5, x[playerid], y[playerid], z[playerid]));
should be
Код:
		if(!IsPlayerInRangeOfPoint(playerid, 5, x[playerid], y[playerid], z[playerid]))



Re: Getting an empty statement error - biltong - 08.04.2010

I'm a dumbass lol. Thanks!


Re: Getting an empty statement error - Babul - 08.04.2010

so am i ^^