Why pawno CC not responding?
#1

Hi guys i was editing my script i added a new job that was working perfectly before i added that new job. when i finished coding new job and when i do compile it, it says Pawno library has stoped working any suggestions?

and i need that job in my script so please!

here's what i added that crashes
Код:
CMD:pickload(playerid, params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
	if(IsPlayerInRangeOfPoint(playerid, 5.0, -2336.9063,-1627.8387,483.7042))
	{
	if (GetVehicleModel(vehicleid) == 455)
	{
	if(mining[playerid] == 3)
	{
	  SendClientMessage(playerid, COLOR_YELLOW2, "===============================LOADED===================================");
	  SendClientMessage(playerid, COLOR_YELLOW2, "               You have sucessfully loaded your pickup                  ");
	  SendClientMessage(playerid, COLOR_YELLOW2, "Now return to dropoff point carefully and return this truck to get paid.");
	  SendClientMessage(playerid, COLOR_YELLOW2, "           Once there type /dropoffload to drop your load               ");
	  SendClientMessage(playerid, COLOR_YELLOW2, "========================================================================");
	  mining[playerid] = 4;
	}
	else (SendClientMessage(playerid, COLOR_RED, "You are not a Mine Worker or you havent selected your load yet!"));
	}
	else (SendClientMessage(playerid, COLOR_WHITE, "You are not in a Mine truck!");
    }
    else (SendClientMessage(playerid, COLOR_WHITE, "*You are not at load pickup point!Go there and use /pickload.");
	return 1;
}
CMD:dropoffload
{
  new vehicleid = GetPlayerVehicleID(playerid);
  if(IsPlayerInRangeOfPoint(playerid, 3.0, -1874.6829,-1675.3923,21.7500))
  {
  if(GetVehicleModel(vehicleid) == 455)
  {
  if(mining[playerid] == 4)
  {
   new rand = RandomEx(2000,8001);
   SendClientMessage(playerid, COLOR_WHITE, "You have Compleated this task for that Bros & Bros Mining co. pvt. ltd. has given you a cheaque of $%i.", rand);
   GivePlayerMoney(playerid, rand);
   miining[playerid] = 0;
  }
  else SendClientMessage(playerid, COLOR_WHITE, "You havent picked you load yet go ad select first!");
  }
  else SendClientMessage(playerid, COLOR_YELLOW, "You are not in a mine truck or are in a wrong truck!");
  }
  else SendClientMessage(playerid, COLOR_RED, "You are not at dropoff point, Go there and type /dropoffload.");
  return 1;
 }
and in OnPlayerEnterCheckPoint

Код:
if(mining[playerid] == 1)
	{
	   DisablePlayerCheckpoint(playerid);
	   mining[playerid] = 2;
       ShowPlayerDialog(playerid, MINING, DIALOG_STYLE_LIST, "Mining Job! Choose what do want to mine", "Money\nOpium\nCoal\nLime Stone", "CHOOSE", "");
	}
	else if(mining[playerid] == 3)
	{
	  DisablePlayerCheckpoint(playerid);
	  mining[playerid] = 4;
	  SetPlayerCheckpoint(playerid, -1874.6829,-1675.3923,21.7500, 1.5);
	  SendClientMessage(playerid, COLOR_YELLOW, "You have sucessfully compleated you job, Now use /dropoffload to get pay.");
	  }
	 else if (mining[playerid] == 4)
	 {
	   DisablePlayerCheckpoint(playerid);
	   mining[playeid] 0;
	 }
and in OnDialogResponse
Код:
if(dialogid == MINING)
	{
	if(response)
	{
		if(mining[playerid] == 2)
		{
	    if(listitem == 0)
	    {
		SendClientMessage(playerid, COLOR_WHITE, "=============You picked to mine for {6EF83C}MONEY{FFFFFF}==========");
		SendClientMessage(playerid, COLOR_WHITE, "This job is very {F81414}Dangerous{FFFFFF}, but it pays well.");
		SendClientMessage(playerid, COLOR_WHITE, "Goto Top of Mt.Chillad and use {F3FF02}/pickload{FFFFFF} to pick load.");
		mining[playerid] == 3;
		SetPlayerCheckpoint(playerid, -2336.9063,-1627.8387,483.7042, 1.5);
		}
		if(listitem == 1)
		{
		SendClientMessage(playerid, COLOR_WHITE, "=============You picked tools to  mine {F81414}OPIUM{FFFFFF}==========");
		SendClientMessage(playerid, COLOR_WHITE, "This job is very {F81414}Dangerous{FFFFFF}, but it pays well.");
		SendClientMessage(playerid, COLOR_WHITE, "Goto Top of Mt.Chillad and use {F3FF02}/pickload{FFFFFF} to pick load.");
        mining[playerid] == 3;
        SetPlayerCheckpoint(playerid, -2336.9063,-1627.8387,483.7042, 1.5);
		}
		if(listitem == 2)
		{
		SendClientMessage(playerid, COLOR_WHITE, "=============You picked tools to  mine {0E0101}COAL{FFFFFF}==========");
		SendClientMessage(playerid, COLOR_WHITE, "This job is very {F81414}Dangerous{FFFFFF}, but it pays well.");
		SendClientMessage(playerid, COLOR_WHITE, "Goto Top of Mt.Chillad and use {F3FF02}/pickload{FFFFFF} to pick load.");
        mining[playerid] == 3;
        SetPlayerCheckpoint(playerid, -2336.9063,-1627.8387,483.7042, 1.5);
		}
		if(listitem == 3)
		{
		SendClientMessage(playerid, COLOR_WHITE, "=============You picked tools to  mine {BCDE12}Lime Stone{FFFFFF}==========");
		SendClientMessage(playerid, COLOR_WHITE, "This job is very {F81414}Dangerous{FFFFFF}, but it pays well.");
		SendClientMessage(playerid, COLOR_WHITE, "Goto Top of Mt.Chillad and use {F3FF02}/pickload{FFFFFF} to pick load.");
        mining[playerid] = 3;
        SetPlayerCheckpoint(playerid, -2336.9063,-1627.8387,483.7042, 1.5);
		}
		}
	}
}
Guys i really need help!
Reply
#2

Misplaced Bracket !!
Indent your code properly and you'll see it.

I just counted the { } and found that the count is odd which means you have a misplaced { or }.
Reply
#3

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Misplaced Bracket !!
Indent your code properly and you'll see it.

I just counted the { } and found that the count is odd which means you have a misplaced { or }.
Nope count again mate its all even!
Reply
#4

pawn Код:
CMD:pickload(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 5.0, -2336.9063,-1627.8387,483.7042)) return SendClientMessage(playerid, COLOR_WHITE, "*You are not at load pickup point!Go there and use /pickload.");
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455) return SendClientMessage(playerid, COLOR_YELLOW, "You are not in a mine truck or are in a wrong truck!");
    if(mining[playerid] != 3) return SendClientMessage(playerid, COLOR_RED, "You are not a Mine Worker or you havent selected your load yet!")
    SendClientMessage(playerid, COLOR_YELLOW2, "===============================LOADED===================================");
    SendClientMessage(playerid, COLOR_YELLOW2, "               You have sucessfully loaded your pickup                  ");
    SendClientMessage(playerid, COLOR_YELLOW2, "Now return to dropoff point carefully and return this truck to get paid.");
    SendClientMessage(playerid, COLOR_YELLOW2, "           Once there type /dropoffload to drop your load               ");
    SendClientMessage(playerid, COLOR_YELLOW2, "========================================================================");
    mining[playerid] = 4;
    return 1;
}

CMD:dropoffload(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 3.0, -1874.6829,-1675.3923,21.7500)) return SendClientMessage(playerid, COLOR_RED, "You are not at the dropoff point. Go there and type /dropoffload.");
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455) return SendClientMessage(playerid, COLOR_YELLOW, "You are not in a mine truck or are in the wrong truck!");
    if(mining[playerid] != 4) return SendClientMessage(playerid, COLOR_WHITE, "You haven't picked you load yet, go and select first!");
    new rand = RandomEx(2000, 8001), fstr[95];
    format(fstr, sizeof(fstr), "'Bros & Bros Mining Co. Pvt. Ltd.' has given you a cheque of $%d for completing this task.", rand);
    SendClientMessage(playerid, COLOR_WHITE, fstr);
    GivePlayerMoney(playerid, rand);
    mining[playerid] = 0;
    return 1;
}
I also noticed you had weird unmatched brackets.
Example:
pawn Код:
else (SendClientMessage(playerid, COLOR_WHITE, "You are not in a Mine truck!");
Reply
#5

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Misplaced Bracket !!
Indent your code properly and you'll see it.

I just counted the { } and found that the count is odd which means you have a misplaced { or }.
Quote:
Originally Posted by Threshold
Посмотреть сообщение
pawn Код:
CMD:pickload(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 5.0, -2336.9063,-1627.8387,483.7042)) return SendClientMessage(playerid, COLOR_WHITE, "*You are not at load pickup point!Go there and use /pickload.");
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455) return SendClientMessage(playerid, COLOR_YELLOW, "You are not in a mine truck or are in a wrong truck!");
    if(mining[playerid] != 3) return SendClientMessage(playerid, COLOR_RED, "You are not a Mine Worker or you havent selected your load yet!")
    SendClientMessage(playerid, COLOR_YELLOW2, "===============================LOADED===================================");
    SendClientMessage(playerid, COLOR_YELLOW2, "               You have sucessfully loaded your pickup                  ");
    SendClientMessage(playerid, COLOR_YELLOW2, "Now return to dropoff point carefully and return this truck to get paid.");
    SendClientMessage(playerid, COLOR_YELLOW2, "           Once there type /dropoffload to drop your load               ");
    SendClientMessage(playerid, COLOR_YELLOW2, "========================================================================");
    mining[playerid] = 4;
    return 1;
}

CMD:dropoffload(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 3.0, -1874.6829,-1675.3923,21.7500)) return SendClientMessage(playerid, COLOR_RED, "You are not at the dropoff point. Go there and type /dropoffload.");
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455) return SendClientMessage(playerid, COLOR_YELLOW, "You are not in a mine truck or are in the wrong truck!");
    if(mining[playerid] != 4) return SendClientMessage(playerid, COLOR_WHITE, "You haven't picked you load yet, go and select first!");
    new rand = RandomEx(2000, 8001), fstr[95];
    format(fstr, sizeof(fstr), "'Bros & Bros Mining Co. Pvt. Ltd.' has given you a cheque of $%d for completing this task.", rand);
    SendClientMessage(playerid, COLOR_WHITE, fstr);
    GivePlayerMoney(playerid, rand);
    mining[playerid] = 0;
    return 1;
}
I also noticed you had weird unmatched brackets.
Example:
pawn Код:
else (SendClientMessage(playerid, COLOR_WHITE, "You are not in a Mine truck!");
sorry i checked it and i found 3 miss match but now there is no mismatch still its saying same!

EDIT: Guys thankyou i got it work just some things i forgot to add due to that code was miss matched any ways thanks rep++ to both of you!
Reply
#6

Dat copyright is the funniest shit.

Misplaced Bracket like that said.
Reply
#7

Quote:
Originally Posted by fonia5
Посмотреть сообщение
Dat copyright is the funniest shit.

Misplaced Bracket like that said.
Yeah, i corrected it now its working thanks!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)