compile error (again.)
#1

help..

Код:
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23662) : error 001: expected token: ")", but found "return"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23662) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23668) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23668) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23675) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23675) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23679) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23686) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23686) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23692) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23692) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23699) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23699) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23708) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23718) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23752) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23769) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23806) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23821) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23829) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23834) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23842) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23851) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23856) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23864) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23871) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23875) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23889) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23897) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23902) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23910) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23919) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23924) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23932) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23939) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23943) : error 078: function uses both "return" and "return <value>"
C:\Documents and Settings\Administrator\My Documents\Raven's Roleplay 0.3c\gamemodes\lolz.pwn(23957) : error 078: function uses both "return" and "return <value>"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

maybe show us the code mister?
Reply
#3

Quote:
Originally Posted by Markx
Посмотреть сообщение
maybe show us the code mister?
Код:
 return 1;
	}
	if(strcmp(cmd, "/clearchat", true) == 0)
	{
	   if(PlayerInfo[playerid][pAdmin] > 2)
	   {
        for(new i; i<50; i++)
		{
		   SendClientMessageToAll(0x000000AA, " ");
		}
        return 1;
	   }
    }
	if(strcmp(cmd, "/aduty", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new msgstring[150];
			if(PlayerInfo[playerid][pAdmin] > 0 && PlayerInfo[playerid][pAdminDuty] == 0)
			{
                format(PlayerInfo[playerid][pNormalName], 255, "%s", GetName(playerid));
				SendClientMessage(playerid, COLOR_GREEN, "   You are now on admin duty.");
				//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
                format(msgstring, sizeof(string), "** Administrator %s is now on admin duty. (/report for assistance) **", PlayerInfo[playerid][pAdminName]);
                SetPlayerColor(playerid, 0x33CCFF00);
	            SendClientMessageToAll(COLOR_YELLOW, msgstring);
				SetPlayerSkin(playerid, 294);
				PlayerInfo[playerid][pAdminDuty] = 1;
				SetPlayerHealth(playerid, 9999);
				SetPlayerArmour(playerid, 9999);

			}
			else if(PlayerInfo[playerid][pAdmin] > 0 && PlayerInfo[playerid][pAdminDuty] != 0)
			{
				SendClientMessage(playerid, COLOR_GREEN, "   You are now off admin duty.");
                format(msgstring, sizeof(string), "** Administrator %s is now off admin duty. **", PlayerInfo[playerid][pAdminName]);
	            SendClientMessageToAll(COLOR_YELLOW, msgstring);
	            //SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
				SetPlayerHealth(playerid, 100);
				SetPlayerArmour(playerid, 0);
				SetPlayerSkin(playerid, 299);
				PlayerInfo[playerid][pAdminDuty] = 0;
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/filterreports", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] > 0 && OverloadedReport == 0)
			{
				SendClientMessageToAll(COLOR_LIGHTRED, "* An administrator has filtered reporting. Do not report unless important!");
				OverloadedReport = 1;
			}
			else if(PlayerInfo[playerid][pAdmin] > 0 && OverloadedReport == 1)
			{
			    SendClientMessageToAll(COLOR_LIGHTRED, "* An administrator has unfiltered reporting. The report system is now back to normal!");
			    OverloadedReport = 0;
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/duty", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pJob] == 2)
			{
			    if(JobDuty[playerid] == 1)
			    {
			        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Lawyer Job and will not receive calls anymore.");
			        JobDuty[playerid] = 0;
			        Lawyers -= 1;
			    }
			    else
			    {
			        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Lawyer Job and will receive calls from people in need.");
			        JobDuty[playerid] = 1;
			        Lawyers += 1;
			    }
			}
			else if(PlayerInfo[playerid][pJob] == 7)
			{
			    if(JobDuty[playerid] == 1)
			    {
			        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Mechanic Job and will not receive calls anymore.");
			        JobDuty[playerid] = 0;
			        Mechanics -= 1;
			    }
			    else
			    {
			        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Mechanic Job and will receive calls from people in need.");
			        JobDuty[playerid] = 1;
			        Mechanics += 1;
			    }
			}
		}
		return 1;
	}
	//EAT-FOOD SYSTEM
	if(strcmp(cmd, "/buydonut", true) == 0) // Trunk system
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsPlayerInRangeOfPoint(playerid, 100.0, 373.825653,-117.270904,1001.499511))
			{
			new x_nr[64];
			x_nr = strtok(cmdtext, idx);
			if(!strlen(x_nr))
			{
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: /eatdonut [name]");
			    SendClientMessage(playerid, COLOR_WHITE, "Available names: Sprinkled($500) | Chocolate($500)");
			    return 1;
			}
			if(strcmp(x_nr,"sprinkled",true) == 0)
			{
						{
			            if(PlayerInfo[playerid][pInBiz] == 255)
      					{
			                SendClientMessage(playerid, COLOR_GREY, "  You need to be in a donut shop business to buy this meal!");
			            	return 1;
               			}
               			if(PlayerInfo[playerid][pCash] < 500)
               			{
							SendClientMessage(playerid, COLOR_GREY, "ERROR: You cannot afford this !");
							return 1;
						}
               			new bizid = PlayerInfo[playerid][pInBiz];
               			PlayerInfo[bizid][bTill] += 250;
			            PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-500;
               			GivePlayerMoney(playerid, -500);
               			SendClientMessage(playerid, COLOR_GREY, " You bought a Sprinkled Donut! It healed your health.");
               			SetPlayerHealth(playerid, 100);
						return 1;
			            }
			}
			if(strcmp(x_nr,"chocolate",true) == 0)
			{
						{
			            if(PlayerInfo[playerid][pInBiz] == 255)
      					{
			                SendClientMessage(playerid, COLOR_GREY, "  You need to be in a donut shop business to buy this meal!");
			            	return 1;
               			}
               			if(PlayerInfo[playerid][pCash] < 500)
               			{
							SendClientMessage(playerid, COLOR_GREY, "ERROR: You cannot afford this !");
							return 1;
						}
               			new bizid = PlayerInfo[playerid][pInBiz];
               			PlayerInfo[bizid][bTill] += 250;
			            PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-500;
               			GivePlayerMoney(playerid, -500);
               			SendClientMessage(playerid, COLOR_GREY, " You bought a Chocolate Donut! It healed your health.");
               			SetPlayerHealth(playerid, 100);
						return 1;
			            }
			}
			else
			{
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: /buydonut [name]");
			    SendClientMessage(playerid, COLOR_WHITE, "Available names: Sprinkled($500) | Chocolate($500)");
			    return 1;
			}
			}
	    }
	    return 1;
	}
	if(strcmp(cmd, "/buypizza", true) == 0) // Trunk system
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsPlayerInRangeOfPoint(playerid, 100.0, 373.825653,-117.270904,1001.499511))
			{
			new x_nr[64];
			x_nr = strtok(cmdtext, idx);
			if(!strlen(x_nr))
			{
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: /buypizza [name]");
			    SendClientMessage(playerid, COLOR_WHITE, "Available names: ChickenPizza($500) | HamNCheese($500)");
			    return 1;
			}
			if(strcmp(x_nr,"chickenpizza",true) == 0)
			{
						{
			            if(PlayerInfo[playerid][pInBiz] == 255)
      					{
			                SendClientMessage(playerid, COLOR_GREY, "  You need to be in a pizza stack business to buy this meal!");
			            	return 1;
               			}
               			if(PlayerInfo[playerid][pCash] < 500)
               			{
							SendClientMessage(playerid, COLOR_GREY, "ERROR: You cannot afford this !");
							return 1;
						}
               			new bizid = PlayerInfo[playerid][pInBiz];
               			PlayerInfo[bizid][bTill] += 250;
			            PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-500;
               			GivePlayerMoney(playerid, -500);
               			SendClientMessage(playerid, COLOR_GREY, " You bought a Chicken Pizza! It healed your health.");
               			SetPlayerHealth(playerid, 100);
						return 1;
			            }
			}
			if(strcmp(x_nr,"hamncheese",true) == 0)
			{
						{
			            if(PlayerInfo[playerid][pInBiz] == 255)
      					{
			                SendClientMessage(playerid, COLOR_GREY, "  You need to be in a pizza stack business to buy this meal!");
			            	return 1;
               			}
               			if(PlayerInfo[playerid][pCash] < 500)
               			{
							SendClientMessage(playerid, COLOR_GREY, "ERROR: You cannot afford this !");
							return 1;
						}
               			new bizid = PlayerInfo[playerid][pInBiz];
               			PlayerInfo[bizid][bTill] += 250;
			            PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-500;
               			GivePlayerMoney(playerid, -500);
               			SendClientMessage(playerid, COLOR_GREY, " You bought a HamNCheese pizza! It healed your health.");
               			SetPlayerHealth(playerid, 100);
						return 1;
			            }
			}
			else
			{
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: /buypizza [name]");
			    SendClientMessage(playerid, COLOR_WHITE, "Available names: ChickenPizza($500) | HamNCheese($500)");
			    return 1;
			}
			}
	    }
	    return 1;
	}
	if(strcmp(cmd, "/buyburger", true) == 0) // Trunk system
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsPlayerInRangeOfPoint(playerid, 100.0, 375.962463,-65.816848,1001.507812))
			{
			new x_nr[64];
			x_nr = strtok(cmdtext, idx);
			if(!strlen(x_nr))
			{
			    SendClientMessage(playerid, COLOR_WHITE, "HINT: /buyburger [name]");
			    SendClientMessage(playerid, COLOR_WHITE, "Available names: DoubleWhopper($250), ChickenBurger($100)");
			    return 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)