Bracket Fixing Help - 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: Bracket Fixing Help (
/showthread.php?tid=478654)
Bracket Fixing Help -
wertboi333 - 30.11.2013
I used Bracket Finder to find my missing brackets in my script, but I am a scripting noob, and do not know how to fix the brackets.
Код:
MISSING BRACKET: The { bracket on line 76254 does not have a pair!
MISSING BRACKET: The { bracket on line 76597 does not have a pair!
MISSING BRACKET: The { bracket on line 76608 does not have a pair!
MISSING BRACKET: The { bracket on line 76623 does not have a pair!
MISSING BRACKET: The { bracket on line 76662 does not have a pair!
MISSING BRACKET: The { bracket on line 76674 does not have a pair!
MISSING BRACKET: The { bracket on line 76686 does not have a pair!
MISSING BRACKET: The { bracket on line 76698 does not have a pair!
MISSING BRACKET: The { bracket on line 76710 does not have a pair!
Result:
Opening angle brackets ({): 15072
Closing angle brackets (}): 15063
9 angle brackets without pair! Fix it!
Here is an Example of a line its telling me to fix
Код:
{
if(response)
{
if(listitem == 0) // Duty
{
if(PlayerInfo[playerid][pDuty]==0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You are now on-duty.");
SetPlayerColor(playerid, COLOR_TR);
OnDuty[playerid] = 1;
PlayerInfo[playerid][pDuty] = 1;
}
else if(PlayerInfo[playerid][pDuty]==1)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You are no longer on-duty.");
SetPlayerColor(playerid, TEAM_HIT_COLOR);
OnDuty[playerid] = 0;
PlayerInfo[playerid][pDuty] = 0;
}
}
if(listitem == 1) // Clothes
{
ShowPlayerDialog(playerid, TRSKINMENU, DIALOG_STYLE_LIST, "Tierra Robada Clothing","Male skin 1\nMale skin 2\nMale skin 3\nMale skin 4\nMale skin 5\nFemale skin 1\nFemale skin 2\nFemale skin 3", "Select", "Cancel");
}
}
}
The red text is the specific line 76597
Please Help
Re: Bracket Fixing Help -
Loot - 30.11.2013
You're missing 9 closing brackets, check around the code of the error line (could be ~100 lines or more before or after)
I don't see any issue with the code you've provided.
Код:
Opening angle brackets ({): 15072
Closing angle brackets (}): 15063
Re: Bracket Fixing Help -
wertboi333 - 30.11.2013
Код:
Opening angle brackets ({): 15072
Closing angle brackets (}): 15063
What does that mean?
And so by missing bracket, does that mean there is a bracket section not closed, like { needed a } to close it?
Re: Bracket Fixing Help -
Konstantinos - 30.11.2013
Yes, it means that you open a bracker { but you never closed its pair with }.
You should look from line 76250 and after so you can close the bracket. Do the same for the rest at the lines it says.
Re: Bracket Fixing Help -
wertboi333 - 30.11.2013
I looked up to line 77000 and no missing brackets. idk what to do.