unreachable code warning
#1

I get the unreachable code warning on this code:
Код:
	if(IsPlayerInRangeOfPoint(playerid,1.5,1248.038940, -1559.942993, 13.563451)) //vip club
	{
        if(PlayerInfo[playerid][pDonateRank] >= 1)
		{
		SetPlayerInterior(playerid,17);
		SetPlayerVirtualWorld(playerid,30);
		SetPlayerPos(playerid,493.390991,-22.722799,1000.679687);
		GameTextForPlayer(playerid, "~w~The VIP Club", 5000, 1);
 		return 1;
		}
		else
  		{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1248.038940, -1559.942993, 13.563451);
		SendClientMessage(playerid,COLOR_YELLOW,"You're not a VIP loser!");
		return 1;
      }
			return 1;
 	}
Please fix it
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,1.5,1248.038940, -1559.942993, 13.563451)) //vip club
    {
        if(PlayerInfo[playerid][pDonateRank] >= 1)
        {
        SetPlayerInterior(playerid,17);
        SetPlayerVirtualWorld(playerid,30);
        SetPlayerPos(playerid,493.390991,-22.722799,1000.679687);
        GameTextForPlayer(playerid, "~w~The VIP Club", 5000, 1);
        return 1;
        }
        else
        {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,1248.038940, -1559.942993, 13.563451);
        SendClientMessage(playerid,COLOR_YELLOW,"You're not a VIP loser!");
        return 1;
      }
    }
Reply
#3

Thankyou!
Reply
#4

Remove the return 1's from the statements, as they're unnecessary.

P.S. It's a shame someone actually made it for you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)