Little help in Brackets -
Deathlock - 10.09.2014
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
Re: Little help in Brackets -
Deathlock - 10.09.2014
The pawn compiler stops responding and i used the missing brackets finder and got error in this.
Can someone help me now?
Re: Little help in Brackets -
SanAndreasMP - 10.09.2014
Sometimes bracket finder is wrong, try looking closely into the script where you edited recently. Maybe that'll work.
Re: Little help in Brackets -
xyzccode - 10.09.2014
http://codegenerators.pl/
here, try this site.
Re: Little help in Brackets -
Deathlock - 11.09.2014
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?
Re: Little help in Brackets -
BroZeus - 11.09.2014
Its not a bracket problem..
There is no bracket missing in there
Re: Little help in Brackets -
AroseKhanNiazi - 11.09.2014
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