Getting an empty statement error
#1

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?
Reply
#2

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]))
Reply
#3

I'm a dumbass lol. Thanks!
Reply
#4

so am i ^^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)