warning 225: unreachable code
#3

Im going to use it i just always leave the else empty until i edit later,
Anyway i fixed it!
It just needed a code in between the brackets..

pawn Код:
CMD:makeadmin(playerid, params[])
{
  new targetid;
  new adminlevel;

  if (PlayerInfo[playerid][AdminLevel] < 5) return SendClientMessage(playerid, COLOR_RED, "Error ~ You are not an administrator with the required level");
  if (sscanf(params, "ud", targetid, adminlevel)) return SendClientMessage(playerid, COLOR_RED, "Usage ~ /makeadmin [PlayerID/PartOfName] [AdminLevel]");
  if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Error ~ Player not Connected");
  if (adminlevel == PlayerInfo[targetid][AdminLevel]) return SendClientMessage(playerid, COLOR_RED, "Error ~ Player is already this Level");
  else {
    print("Makeadmin command");
  }
  return 1;
}
Reply


Messages In This Thread
warning 225: unreachable code - by Torran - 11.03.2010, 16:35
Re: warning 225: unreachable code - by westre - 11.03.2010, 16:40
Re: warning 225: unreachable code - by Torran - 11.03.2010, 16:44
Re: warning 225: unreachable code - by kLx - 11.03.2010, 16:46
Re: warning 225: unreachable code - by FireScript - 07.01.2012, 00:06
Re: warning 225: unreachable code - by Snowman12 - 28.01.2012, 03:53
Re: warning 225: unreachable code - by 2KY - 28.01.2012, 04:16

Forum Jump:


Users browsing this thread: 1 Guest(s)