Materials Error
#8

Quote:
Originally Posted by Aber▲
Quote:
Originally Posted by keujh
does this seem retarded?
Код:
 GetObjectPos(C4[playerid], bx[playerid], by[playerid], bz[playerid]);
  if(PlayerToPoint(10, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(20, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(30, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(40, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "  i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(50, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "  i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(60, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "   i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(70, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "   i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(80, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "    i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(90, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "    i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(100, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "     i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(110, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "     i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(120, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "      i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(130, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "      i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(140, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "       i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(150, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "       i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(160, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "        i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(170, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "        i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(180, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "         i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(190, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "         i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(200, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "          i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(210, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "          i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(220, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "           i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(230, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "           i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(240, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "            i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(250, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "            i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(260, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "             i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(270, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "             i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(280, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "              i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(290, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "              i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(300, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "               i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(310, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "               i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(320, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "                i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(330, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "                i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(340, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "                 i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(350, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "                 i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else if(PlayerToPoint(360, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "                  i"); TextDrawSetString(Meter3[playerid], "   Range");}
	else
	{
	  TextDrawSetString(Meter3[playerid], "~R~Out Of Range");
	  TextDrawSetString(Meter1[playerid], "~R~                  i");
	}
	return 1;
}
I sent you the whole like PlayerToPoint codes. from line 400 to line 443.


And this was the one u told me to change, ill send u this just incase i fucked up on a bracket or someshit.

Код:
	if(strcmp(cmd, "/getmats", true) == 0)
  {
  	if(PlayerToPoint(3.0,playerid,GunJob[BuyPackagesX],GunJob[BuyPackagesY],GunJob[BuyPackagesZ]))
	  {
  		if(MatsHolding[playerid] >= 10)return SendClientMessage(playerid, COLOR_GREY, "[Error:] You can not hold any more packages");

   		tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "[Usages:] /getmats [amount]");

			new moneys;
			moneys = strval(tmp);
			if(moneys < 1 || moneys > 10) return SendClientMessage(playerid, COLOR_GREY, "[Error:] Maximum number of packages is 10");

			new price = moneys * 100;
			if(GetPlayerCash(playerid) > price)
			{
 				format(string, sizeof(string), "[Info:] You got %d materials packages - Cost: $%d", moneys, price);
			  SendClientMessage(playerid, COLOR_WHITE, string);
			  GivePlayerCash(playerid, - price);
			  MatsHolding[playerid] = moneys;
			}
			else
			{
 				format(string, sizeof(string), "[Error:] You do not have $%d", price);
		  	SendClientMessage(playerid, COLOR_GREY, string);
			}
			else return SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not at the materials package place");
 		}
		return true;
	}

	if(strcmp(cmd, "/sellmats", true) == 0)
  {
  	if(PlayerToPoint(3.0,playerid,GunJob[DeliverX],GunJob[DeliverY],GunJob[DeliverZ]))
  	{
  		if(MatsHolding[playerid] > 0)
   		{
    		new payout = (50)*(MatsHolding[playerid]);
     		format(string, sizeof(string), "[Info:] Materials packages delivered, you got %d materials", payout);
			  SendClientMessage(playerid, COLOR_WHITE, string);
   			PlayerInfo[playerid][pMaterials] += payout;
     		MatsHolding[playerid] = 0;
   		}
    	else SendClientMessage(playerid, COLOR_GREY, "[Error:] You do not have any packages");
			else SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not at the materials dropoff place");
			else SendClientMessage(playerid, COLOR_GREY, "[Error:] Invalid usage");
			}
		}
		return 1;
	}
Try:
pawn Код:
GetObjectPos(C4[playerid], bx[playerid], by[playerid], bz[playerid]);
  if(IsPlayerInRangeOfPoint(10, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 20, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 30, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 40, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 50, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "  i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 60, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "  i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 70, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "   i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 80, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "   i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 90, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "    i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 100, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "    i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 110, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "     i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 120, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "     i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 130, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "      i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 140, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "      i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 150, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "       i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 160, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "       i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 170, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "        i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 180, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "        i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 190, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "         i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 200, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "         i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 210, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "          i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 220, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "          i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 230, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "           i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 240, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "           i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 250, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "            i"); TextDrawSetString(Meter3[playerid], "   Range");}
    else if(IsPlayerInRangeOfPoint(playerid, 260, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "
Okay, now theres another error.
Код:
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(189) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(400) : warning 217: loose indentation
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(401) : warning 217: loose indentation
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(426) : error 037: invalid string (possibly non-terminated string)
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(426 -- 427) : error 001: expected token: ",", but found "else"
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(427) : warning 217: loose indentation
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(427) : error 029: invalid expression, assumed zero
C:\Users\keujh\Desktop\betterwork\GTA SA\gamemodes\Unique-RP.pwn(427) : fatal error 107: too many error messages on one line

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


5 Errors.
Reply


Messages In This Thread
Materials Error - by keujh - 06.12.2009, 06:35
Re: Materials Error - by Abernethy - 06.12.2009, 06:46
Re: Materials Error - by keujh - 06.12.2009, 06:55
Re: Materials Error - by Abernethy - 06.12.2009, 06:56
Re: Materials Error - by keujh - 06.12.2009, 07:02
Re: Materials Error - by Abernethy - 06.12.2009, 07:09
Re: Materials Error - by Joe Staff - 06.12.2009, 07:10
Re: Materials Error - by keujh - 06.12.2009, 07:14
Re: Materials Error - by keujh - 06.12.2009, 07:20
Re: Materials Error - by Joe Staff - 06.12.2009, 07:25

Forum Jump:


Users browsing this thread: 1 Guest(s)