Error in code [ Please help ]
#1

I get 26 errors when I compile this

I get 0 errors when I take out this coding...
What is wronge with this coding

Код:
	if(strcmp(cmd, "/getmats", true) == 0)
	{
	GetPlayerName(playerid, playername, sizeof(playername));
	if(PlayerInfo[playerid][pJob] == 9) && IsPlayerInRangeOfPoint(playerid,10.0,316.2688,1119.7667,1083.8828)) // Route 1
	{
        if(MatsRoute[playerid] == 0 || MatsRoute[playerid] == 1)
        {
	        if(MatsHolding[playerid] < 10)
	        {
	            ShowMatsMenu(playerid,1);
	            PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
      			return 1;
	        }
	        else
	        {
	            PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
	            SendClientMessage(playerid, COLOR_GREY, "I can't sell you anymore, go deliver them.");
      			return 1;
            }
	    }
	    else
	    {
	        PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
	        SendClientMessage(playerid, COLOR_GREY, "You are already doing a other route");
       		return 1;
	    }
	}
	else
	{
	    PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
	    SendClientMessage(playerid, COLOR_GREY, "You are not a arms dealer");
    	return 1;
	}
Reply
#2

You are missing a bracket!

pawn Код:
if(strcmp(cmd, "/getmats", true) == 0)
{
    GetPlayerName(playerid, playername, sizeof(playername));
    if(PlayerInfo[playerid][pJob] == 9) && IsPlayerInRangeOfPoint(playerid,10.0,316.2688,1119.7667,1083.8828)) // Route 1
    {
        if(MatsRoute[playerid] == 0 || MatsRoute[playerid] == 1)
        {
            if(MatsHolding[playerid] < 10)
            {
                ShowMatsMenu(playerid,1);
                PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
                return 1;
            }
            else
            {
                PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
                SendClientMessage(playerid, COLOR_GREY, "I can't sell you anymore, go deliver them.");
                return 1;
            }
        }
        else
        {
            PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
            SendClientMessage(playerid, COLOR_GREY, "You are already doing a other route");
            return 1;
        }
    }
    else
    {
        PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
        SendClientMessage(playerid, COLOR_GREY, "You are not a arms dealer");
    } // You were missing this one.
    return 1;
}
Reply
#3

Limited the error codes but 4 still stand...

Код:
C:\Documents and Settings\Owner\Desktop\03bCore\gamemodes\RGv59.pwn(16607) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\03bCore\gamemodes\RGv59.pwn(16607) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Owner\Desktop\03bCore\gamemodes\RGv59.pwn(16607) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\03bCore\gamemodes\RGv59.pwn(16607) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#4

Here's your last problem:

pawn Код:
if(PlayerInfo[playerid][pJob] == 9 && IsPlayerInRangeOfPoint(playerid,10.0,316.2688,1119.7667,1083.8828))
You had an extra bracket in there, closing off the statement before it should've been closed
Reply
#5

Thank you <3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)