SA-MP Forums Archive
Pawn Compile Library Stopped Working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pawn Compile Library Stopped Working (/showthread.php?tid=387078)



Pawn Compile Library Stopped Working - Laure - 23.10.2012

Can i know what am i doing wrong here whenever i try to compile the below code my pawno stops working and says something like Pawn Compile Library has stopped working
Код:
	if(dialogid == 7483) // VIP Command
	{
		if(response)
		{
			if(listitem == 0)
			{
					 {
   						if(PlayerInfo[playerid][pDonateRank] =< 1)
  						SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    					return 1;
					 }
					 {
        				if(IsPlayerInAnyVehicle(playerid))
            			RepairVehicle(GetPlayerVehicleID(playerid));
       		 			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Vehicle has been successfully fixed with the VIP Feature!");
       		 		 }
				}
    			return 1;
			}



Re: Pawn Compile Library Stopped Working - Laure - 23.10.2012

Anyone to help?


Re: Pawn Compile Library Stopped Working - RedJohn - 23.10.2012

Код:
if(dialogid == 7483) // VIP Command
{
    if(response)
    {
        if(listitem == 0)
        {
            if(PlayerInfo[playerid][pDonateRank] =< 1) return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
            if(IsPlayerInAnyVehicle(playerid)) RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Vehicle has been successfully fixed with the VIP Feature!");
            return 1;
        }
        if(listitem == 1)
        {
             // Write your code here
        }         
    }
    return 1;
}



Re: Pawn Compile Library Stopped Working - cosbraa - 23.10.2012

Edit;
Above beat me, plus mine was bad


Re: Pawn Compile Library Stopped Working - denNorske - 23.10.2012

Look what i did:

Код:
	if(dialogid == 7483) // VIP Command
	{
		if(response)
		{
			if(listitem == 0)
			{
   						if(PlayerInfo[playerid][pDonateRank] =< 1)
		 				{
  							SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
						}
    					if(IsPlayerInAnyVehicle(playerid))
    					{
            				RepairVehicle(GetPlayerVehicleID(playerid));
       		 				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Vehicle has been successfully fixed with the VIP Feature!");
						}
			}
			if (listitem == 1) //and so on....



Re: Pawn Compile Library Stopped Working - Laure - 23.10.2012

Still the same didnt work


Re: Pawn Compile Library Stopped Working - RedJohn - 23.10.2012

Sorry for double post.
http://codegenerators.pl/brackets

Paste your whole code at following link and see if opening and closing braces are matching.


Re: Pawn Compile Library Stopped Working - Laure - 23.10.2012

I had done a change at the first phase and that happen check the whole phase
Код:
	if(dialogid == 7483) // VIP Command
	{
		if(response)
		{
			if(listitem == 0)
			{
   						if(PlayerInfo[playerid][pDonateRank] =< 1)
		 				{
  							SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
						}
    					if(IsPlayerInAnyVehicle(playerid))
    					{
            				RepairVehicle(GetPlayerVehicleID(playerid));
       		 				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Vehicle has been successfully fixed with the VIP Feature!");
						}
					return 1;
			}
			if(listitem == 1)
			{
                    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
					{
					    new vehicleid = GetPlayerVehicleID(playerid);
					    new engine,lights,alarm,doors,bonnet,boot,objective;
				    	GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
					    if(engine == VEHICLE_PARAMS_ON) return SendClientMessageEx(playerid, COLOR_RED, "You need to shut off the engine before filling up (/car engine).");
						if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_RED,"This vehicle doesn't need fuel.");
					    if(VehicleFuel[vehicleid] >= 100.0) return SendClientMessageEx(playerid, COLOR_GREEN, "This vehicle's tank is already full.");
					    if(RefuelingVehicle[playerid] == 1) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You are refilling your vehicle's tank.");
				       	SendClientMessageEx(playerid, COLOR_YELLOW2, "Refueling your vehicle's tank, please wait.");
				       	RefuelingVehicle[playerid] = 1;
				       	RefuelingVehicleTimer[playerid] = SetTimerEx("ReFill", 1000, true, "i", playerid);
					}
					return 1;
			}
			if(listitem == 2)
			{
				if(PlayerInfo[playerid][pDonateRank] >= 1)
				{
			    	ShowPlayerDialog(playerid, VIPWEPSMENU, DIALOG_STYLE_LIST, "VIP Weapons Pointshop", "Desert Eagle (3)\nSPAS-12 (5)\nM4 (4)\nAK-47 (4)\nShotgun (2)\nMP5 (3)\nSniper (5)\nSilenced Pistol (2)\nGolf Club (1)\nBat (1)\nDildo (1)\nSword (1)", "Select", "Cancel");
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_YELLOW, "Warning: You must be a VIP member to access the gun lockers.");
				}
			}
			if(listitem == 3)
			{
            	if(PlayerInfo[playerid][pDonateRank] >= 2)
            	{
			    	ShowPlayerDialog( playerid, 3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
			    }
			    else
			    {
			    	SendClientMessageEx(playerid, COLOR_YELLOW, "Warning: You must be at least Silver VIP to access the clothes corner. In the clothes corner you can get ANY skin.");
			    }
			}
			/*if(listitem == 4)
			{
  				if(PlayerInfo[playerid][pDonateRank] >= 2)
            	{
			    	ShowPlayerDialog(playerid, 7484, DIALOG_STYLE_LIST, "Warning: Job Center", "Detective\nLawyer\nWhore\nDrugs Dealer\nBodyguard\nMechanic\nArms Dealer\nBoxer\nDrugs Smuggler\nTaxi Driver\nCraftsman\nBartender\nTrucker\nPizza Boy", "Proceed", "Cancel");
		    	}
			    else
			    {
			    	SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You must be at least Silver VIP to access the job center.");
			    }
			}*/
			if(listitem == 5)
			{
			    ShowPlayerDialog(playerid, 7486, DIALOG_STYLE_LIST, "VIP: VIP Tab Color", "On\nOff", "Proceed", "Cancel");
			}
		}
	}



Re: Pawn Compile Library Stopped Working - Laure - 23.10.2012

I fixed this what happend was the higher than or equal to sign was incorrect.
Код:
	if(dialogid == 7483) // VIP Command
	{
		if(response)
		{
			if(listitem == 0)
			{
   						if(PlayerInfo[playerid][pDonateRank] >= 1) // OVer here the higher than or equal to symbol was incorrect.
		 				{
  							SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
						}
    					if(IsPlayerInAnyVehicle(playerid))
    					{
            				RepairVehicle(GetPlayerVehicleID(playerid));
       		 				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Vehicle has been successfully fixed with the VIP Feature!");
						}
			}
			if (listitem == 1) //and so on....
Thank you for trying to help.


Re: Pawn Compile Library Stopped Working - RedJohn - 23.10.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
For reference, that's not a double post, that's just two posts. A double post is where you post twice with no-one else posting in between your posts. Many people posted between yours, so this is just you continuing a conversation essentially.
I love the how you explain EVERYTHING, just EVERYTHING so nobody won't repeat it again. Thank you.