warning 209: function "cmd_quests" should return a value
#1

CMD:quests(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
if(IsPlayerConnected(playerid))
{
new quest1[128],quest2[128],quest11[256],quest22[256];
if(PlayerInfo[playerid][pLanguage] == 1)
{
if(PlayerInfo[playerid][pQuest1] == 1) format(quest1,sizeof(quest1),"Go to the baseball stadium located in Las Venturas");
else if(PlayerInfo[playerid][pQuest1] == 2) format(quest1,sizeof(quest1),"Climb mount Chiliad");
else if(PlayerInfo[playerid][pQuest1] == 3) format(quest1,sizeof(quest1),"Traved %d KM with vehicle %s",PlayerInfo[playerid][pQuestNeed1],aVehicleNames[PlayerInfo[playerid][pQuestCar] - 400]);
else if(PlayerInfo[playerid][pQuest1] == 4) format(quest1,sizeof(quest1),"Rob a business");
else if(PlayerInfo[playerid][pQuest1] == 5) format(quest1,sizeof(quest1),"Collect %d materials",PlayerInfo[playerid][pQuestNeed1]);
else if(PlayerInfo[playerid][pQuest1] == 6) format(quest1,sizeof(quest1),"Catch and sell %d fish",PlayerInfo[playerid][pQuestNeed1]);

if(PlayerInfo[playerid][pQuest2] == 1) format(quest2,sizeof(quest2),"Deliver %d pizza",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 2)
{
if(!IsACop(playerid))
{
format(quest2,sizeof(quest2),"Kill %d cops",PlayerInfo[playerid][pQuestNeed2]);
}
else
{
format(quest2,sizeof(quest2),"Arrest %d suspects",PlayerInfo[playerid][pQuestNeed2]);
}
}
else if(PlayerInfo[playerid][pQuest2] == 3) format(quest2,sizeof(quest2),"Kill %d players at paintball",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 4) format(quest2,sizeof(quest2),"Collect and unload %d KG of garbage",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 5) format(quest2,sizeof(quest2),"Sell %d KG of flour",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 6) format(quest2,sizeof(quest2),"Buy drugs and use them");
else if(PlayerInfo[playerid][pQuest2] == 7) format(quest2,sizeof(quest2),"Go in a bar and get drunk");

format(quest11,sizeof(quest11),"%s | Progress: %d/%d",quest1,PlayerInfo[playerid][pQuestProgress1],PlayerInfo[playerid][pQuestNeed1]);
format(quest22,sizeof(quest22),"%s | Progress: %d/%d",quest2,PlayerInfo[playerid][pQuestProgress2],PlayerInfo[playerid][pQuestNeed2]);
}
else
{
if(PlayerInfo[playerid][pQuest1] == 1) format(quest1,sizeof(quest1),"Mergi pe stadionul de baseball din Las Venturas");
else if(PlayerInfo[playerid][pQuest1] == 2) format(quest1,sizeof(quest1),"Urca pe muntele Chiliad");
else if(PlayerInfo[playerid][pQuest1] == 3) format(quest1,sizeof(quest1),"Parcurge distanta de %d KM cu un vehicul de tipul %s",PlayerInfo[playerid][pQuestNeed1],aVehicleNames[PlayerInfo[playerid][pQuestCar] - 400]);
else if(PlayerInfo[playerid][pQuest1] == 4) format(quest1,sizeof(quest1),"Jefuieste o afacere");
else if(PlayerInfo[playerid][pQuest1] == 5) format(quest1,sizeof(quest1),"Colecteaza %d materiale",PlayerInfo[playerid][pQuestNeed1]);
else if(PlayerInfo[playerid][pQuest1] == 6) format(quest1,sizeof(quest1),"Vinde %d pesti",PlayerInfo[playerid][pQuestNeed1]);

if(PlayerInfo[playerid][pQuest2] == 1) format(quest2,sizeof(quest2),"Livreaza %d pizza",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 2)
{
if(!IsACop(playerid))
{
format(quest2,sizeof(quest2),"Omoara %d politisti",PlayerInfo[playerid][pQuestNeed2]);
}
else
{
format(quest2,sizeof(quest2),"Aresteaza %d suspecti",PlayerInfo[playerid][pQuestNeed2]);
}
}
else if(PlayerInfo[playerid][pQuest2] == 3) format(quest2,sizeof(quest2),"Omoara %d playeri la Paintball",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 4) format(quest2,sizeof(quest2),"Colecteaza si descarca %d KG de gunoi",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 5) format(quest2,sizeof(quest2),"Vinde %d KG de faina",PlayerInfo[playerid][pQuestNeed2]);
else if(PlayerInfo[playerid][pQuest2] == 6) format(quest2,sizeof(quest2),"Cumpara droguri si foloseste-le");
else if(PlayerInfo[playerid][pQuest2] == 7) format(quest2,sizeof(quest2),"Du-te intr-un bar si imbata-te");

format(quest11,sizeof(quest11),"%s | Progres: %d/%d",quest1,PlayerInfo[playerid][pQuestProgress1],PlayerInfo[playerid][pQuestNeed1]);
format(quest22,sizeof(quest22),"%s | Progres: %d/%d",quest2,PlayerInfo[playerid][pQuestProgress2],PlayerInfo[playerid][pQuestNeed2]);
}

SendClientMessage(playerid, COLOR_YELLOW, quest11);
SendClientMessage(playerid, COLOR_YELLOW, quest22);

}
}
return 1;



WARNING:warning 209: function "cmd_quests" should return a value
LINE:CMD:quests(playerid, params[])
Reply


Messages In This Thread
warning 209: function "cmd_quests" should return a value - by xXGabyGabiXx - 04.07.2017, 16:22
Re: warning 209: function "cmd_quests" should return a value - by xXGabyGabiXx - 04.07.2017, 17:07
Re: warning 209: function "cmd_quests" should return a value - by Meller - 04.07.2017, 17:32
Re: warning 209: function "cmd_quests" should return a value - by xXGabyGabiXx - 04.07.2017, 17:40

Forum Jump:


Users browsing this thread: 1 Guest(s)