Problems with cmd
#1

Helllo got a problem with a cmd i guess it some bracket missing but i cant find it please help ill add rep!


Error on line 18332 ill show wich one (The secound last line in the script Return 1

Код:
(18332) : warning 225: unreachable code
Here is the code
Код:
CMD:liveban(playerid, params[])
{
	 if(PlayerInfo[playerid][pFaction] != NEWS) return SCM(playerid, COLOR_WHITE,"You are not a News Reporter!");
	 if(PlayerInfo[playerid][pRank] < 5) return SCM(playerid, COLOR_LIGHTRED, "You are not authorized to use this command.");
	    
		new 
			giveplayerid,
			newsreporter,
	        string[128];

	    if(sscanf(params, "u", giveplayerid)) 
			return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /liveban [player]");
			
		if(!IsPlayerConnected(giveplayerid))
			return SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
			
		foreach(Player, i) {
			if(TalkingLive[i] == giveplayerid) newsreporter = i;
		}
			
		if(TalkingLive[newsreporter] != INVALID_PLAYER_ID) {
			SendClientMessage(newsreporter, COLOR_LIGHTBLUE, "* Live conversation ended.");
			SendClientMessage(TalkingLive[newsreporter], COLOR_LIGHTBLUE, "* Live conversation ended.");
			TogglePlayerControllable(newsreporter, 1);
			TogglePlayerControllable(TalkingLive[newsreporter], 1);
			TalkingLive[TalkingLive[newsreporter]] = INVALID_PLAYER_ID;
			TalkingLive[newsreporter] = INVALID_PLAYER_ID;
		}
		
	    if(PlayerInfo[giveplayerid][pLiveBanned] == 0) {
	        PlayerInfo[giveplayerid][pLiveBanned] = 1;
	        format(string, sizeof(string), "%s has interview banned %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
	        ICNews(COLOR_LIGHTGREEN,string);
			format(string, sizeof(string), "You have been interview banned by %s", GetPlayerNameEx(playerid));
	        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	        return 1;
	    }  else  {
	        PlayerInfo[giveplayerid][pLiveBanned] = 0;
	        format(string, sizeof(string), "%s has unbanned %s from interviews", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
	        ICNews(COLOR_LIGHTGREEN,string);
			format(string, sizeof(string), "You have been interview unbanned by %s", GetPlayerNameEx(playerid));
	        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
	        return 1;
	    }
	return 1; /// 18332 ================ERROR HERE for some reason//
}
Reply


Messages In This Thread
Problems with cmd - by Pk93 - 12.08.2013, 02:17
Re: Problems with cmd - by Lucky™ - 12.08.2013, 02:28
Re: Problems with cmd - by Lucky™ - 12.08.2013, 03:43
Re: Problems with cmd - by Pk93 - 12.08.2013, 03:45
Re: Problems with cmd - by verlaj - 12.08.2013, 03:46
Re: Problems with cmd - by Pk93 - 12.08.2013, 03:49

Forum Jump:


Users browsing this thread: 1 Guest(s)