Little help in Brackets
#1

Is there any brackets missing?
If yes can you fix and send me code via Reply or PM please?
Код:
//gun SHOPMENU
    else if(dialogid == DIALOG_PLAYURL)
	{
	    if(!response || strlen(inputtext) == 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You have prevented yourself from Setting an URL." );
	    else
	    {
			if(IsPlayerInAnyVehicle(playerid))
			{
			    PlayAudioStreamForPlayerEx(playerid, inputtext);
				SetPVarInt(playerid, "MusicIRadio", 1);
			}
			else
			{
				PlayAudioStreamForPlayerEx(playerid, inputtext);
				SetPVarInt(playerid, "MusicIRadio", 1);
			}
		}
	}
	if(dialogid == 3130)
	{
	    new bizid;
		if(response)
		{
			if(listitem == 0)
			{
				if (GetPlayerCash(playerid) >= 2000)
				{
					GivePlayerValidWeapon(playerid, 23, 99999);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a Sd-Pistol !");
					GivePlayerCash(playerid, -2000);
					BizInfo[bizid][bMoney] += 2000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 1)
			{
				if (GetPlayerCash(playerid) >= 6000)
				{
					GivePlayerValidWeapon(playerid, 22, 60000);
					GivePlayerCash(playerid, -6000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a 9mm!");
					BizInfo[bizid][bMoney] += 6000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 2)
			{
				if (GetPlayerCash(playerid) >= 8000)
				{
					GivePlayerValidWeapon(playerid, 25, 99999);
					GivePlayerCash(playerid, -8000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a shotgun!");
					BizInfo[bizid][bMoney] += 8000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 3)
			{
				if (GetPlayerCash(playerid) >= 16000)
				{
					GivePlayerValidWeapon(playerid, 29, 99999);
					GivePlayerCash(playerid, -16000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased an MP5!");
					BizInfo[bizid][bMoney] += 16000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 4)
			{
				if (GetPlayerCash(playerid) >= 40000)
				{
					GivePlayerValidWeapon(playerid, 33, 99999);
					GivePlayerCash(playerid, -40000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a rifle!");
					BizInfo[bizid][bMoney] += 40000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 5)
			{
				if (GetPlayerCash(playerid) >= 80000)
				{
					GivePlayerValidWeapon(playerid, 24, 99999);
					GivePlayerCash(playerid, -80000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a Desert Eagle!");
					BizInfo[bizid][bMoney] += 80000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 6)
			{
				if (GetPlayerCash(playerid) >= 180000)
				{
					GivePlayerValidWeapon(playerid, 30, 99999);
					GivePlayerCash(playerid, -180000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased an AK-47!");
					BizInfo[bizid][bMoney] += 180000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 7)
			{
				if (GetPlayerCash(playerid) >= 240000)
				{
					GivePlayerValidWeapon(playerid, 31, 99999);
					GivePlayerCash(playerid, -240000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased an M4!");
					BizInfo[bizid][bMoney] += 240000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 8)
			{
				if (GetPlayerCash(playerid) >= 400000)
				{
					GivePlayerValidWeapon(playerid, 34, 99999);
					GivePlayerCash(playerid, -400000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a sniper rifle!");
					BizInfo[bizid][bMoney] += 400000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
			if(listitem == 9)
			{
				if (GetPlayerCash(playerid) >= 500000)
				{
					GivePlayerValidWeapon(playerid, 27, 99999);
					GivePlayerCash(playerid, -500000);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have purchased a SPAS-12!");
					BizInfo[bizid][bMoney] += 500000;
    				SaveBiz();
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
				}
			}
		}
	}
	//end GUN MENU
Reply
#2

The pawn compiler stops responding and i used the missing brackets finder and got error in this.
Can someone help me now?
Reply
#3

Sometimes bracket finder is wrong, try looking closely into the script where you edited recently. Maybe that'll work.
Reply
#4

http://codegenerators.pl/

here, try this site.
Reply
#5

codegenerators.pl did not help me.
My pawno compiler still closes and I redo all the script and there is not errors.
Please help me in fixing this?
Reply
#6

Its not a bracket problem..
There is no bracket missing in there
Reply
#7

well sometime it crashes from small other mistakes like missing somthing in "public" or other small bugs try /* */ commenting code till you find the callback,stock or line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)