warning 225: unreachable code
#1

Код:
command(editpricecar, playerid, params[])
{
	new string[128];
	new price, carid;
	new PlayerName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	if(PlayerData[playerid][pAdmin] >= 6)
  	{
		if(sscanf(params, "ud", id, price))
		{
		    SendUsage(playerid,"/editpricecar [carid] [value]");
		}
		if(carid <= PreVehicle)
		{
		    format(string, sizeof(string), "Server: Masinile personala au id-ul de la %d +",PreVehicle);
			SendClientMessage(playerid, COLOR_WHITE, string);
		    return 1;
		}
		if(price < 1)
		{
		    SendClientMessage(playerid, COLOR_GRAD1,"Server: Pretul trebuie sa fie mai mare de 1$");
			return 1;
		}
		if(CarData[carid-PreVehicle][cModel] < 400 || CarData[carid-PreVehicle][cModel] > 611)
		{
		    SendClientMessage(playerid, COLOR_GRAD1,"Server: Aceasta masina nu este personala! Este creata cu /veh");
		    return 1;
		}
		CarData[carid-PreVehicle][cValue] = price;
		format(string, sizeof(string), "Pretul masinii cu id-ul %d este acum %d" , carid,price);
		SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
		format(string, sizeof(string), "UPDATE cars SET Value='%d' WHERE id=%d", CarData[carid-PreVehicle][cValue], carid-PreVehicle);
		mysql_query(string);
		return 1;
	}
	else return SendClientMessage(playerid, GREY, AdminOnly);
	return 1;
}
Reply
#2

pawn Код:
}
    else return SendClientMessage(playerid, GREY, AdminOnly);
    return 1; // Remove this line.
}
Reply
#3

I'm using ZCMD and I must use return 1
Reply
#4

Before you write, at least try what I wrote. You ARE returning a value when you return SendClientMessage.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)