PDA

View Full Version : Missing Bracket


MP2
20/05/2012, 02:30 PM
How the hell do I find a missing bracket? I'm not even sure if it is a missing bracket:


C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(8813) : error 004: function "ResetElevatorQueue" is not implemented
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(8814) : error 004: function "Elevator_Initialize" is not implemented
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(11462) : error 017: undefined symbol "time"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13388) : error 017: undefined symbol "time"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13404) : error 017: undefined symbol "NPC_MSG"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13420) : error 017: undefined symbol "NPC_MSG"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13499) : error 017: undefined symbol "Debug"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13514) : error 017: undefined symbol "GivePlayerScore"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13515) : error 017: undefined symbol "GivePlayerCash"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13522) : error 017: undefined symbol "GivePlayerScore"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13523) : error 017: undefined symbol "GivePlayerCash"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13529) : error 017: undefined symbol "GivePlayerScore"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13530) : error 017: undefined symbol "GivePlayerCash"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13552) : error 017: undefined symbol "GTXT"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13557) : error 017: undefined symbol "GivePlayerScore"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13558) : error 017: undefined symbol "GivePlayerCash"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13561) : error 017: undefined symbol "SendClientMessageToAllBut"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13562) : error 017: undefined symbol "PlaySoundForPlayer"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13592) : error 017: undefined symbol "GTXT"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13610) : error 017: undefined symbol "SendClientMessageToAllBut"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13624) : error 017: undefined symbol "GTXT"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13634) : error 017: undefined symbol "PlaySoundForPlayer"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13653) : error 017: undefined symbol "GivePlayerCash"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13654) : error 017: undefined symbol "GivePlayerScore"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13661) : error 017: undefined symbol "SendClientMessageToAllBut"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gamemodes\MS.pwn(13663) : error 017: undefined symbol "ClearChat"

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.


I've tried the BracketFix program, and it seems to just point to a random bracket.

Clearly I did something last night at 4AM when tired :/

[FMJ]PowerSurge
20/05/2012, 02:32 PM
You go back to the place you last edited and you count how many opening/closing brackets you have. If that's not the problem, you're gonna have a bad time finding it. Sorry D:

And yes, 26 errors is usually a missing bracket. Try using the BracketFix program, go to the 'random bracket' and search around there. Check for any brackets hidden in poor indentation (if there is any) too.

MP2
20/05/2012, 02:34 PM
1. I don't know what I last edited :(
2. I don't have poor indentation.
3. I've checked around the random bracket, it's right at the end of OnDialogResponse

I removed the entire OnDialogResponse callback and it's still causing a problem. Is the problem ABOVE OnDialogResponse or what?

[FMJ]PowerSurge
20/05/2012, 02:37 PM
Does it give the same bracket each time you use it? I've never used the program so I don't know how accurate it is. You could always try looking at the end of lines around that area, I guess. Or just try hard to remember :3

Off-topic: OMG you're from Nottingham ;O

Faisal_khan
20/05/2012, 02:38 PM
Try this Tidy-Pawn (http://dracoblue.net/tidy/pawn/)

MP2
20/05/2012, 02:44 PM
That indents code. I indent my code perfectly. That is not the problem. Even if it were, I have a 50k line gamemode, I'm hardly going to go through in line by line.


PowerSurge;1874832']Does it give the same bracket each time you use it? I've never used the program so I don't know how accurate it is. You could always try looking at the end of lines around that area, I guess. Or just try hard to remember :3

Off-topic: OMG you're from Nottingham ;O
Yeah I've tried it 3 times, same bracket.
I just removed ALL of my callbacks (almost), and the problem is still happening, so fuck knows what I've done.

And yes, I'm from Nottingham. Stapleford to be exact.

[ABK]Antonio
20/05/2012, 02:46 PM
Did you remove any includes that you used before? I know that sounds pretty dumb but never know..

MP2
20/05/2012, 02:51 PM
I just compiled an earlier (~week) version of the script (same includes and stuff) and it compiles fine. Looks like I'm reverting to an older version. Won't lose much, I can just copy over what I need. I should learn to backup!

[FMJ]PowerSurge
20/05/2012, 02:51 PM
Try commenting out any custom functions that you've added in the past 2 or so days. If it still doesn't work, try commenting out any commands, etc you've added, and try commenting out the rest of the callbacks.

I know this sounds extremely stupid, but this happened to me once and I was devastated because I commented literally the whole script and it still gave 26 errors. Turns out I had a 'd' as the first character of my script, before the includes etc, that I had mistyped some time.

- You live so close to me D:

Niko_boy
20/05/2012, 04:03 PM
Tried Bracket Finder ? by iPleoMax?

[FMJ]PowerSurge
20/05/2012, 04:04 PM
EDIT: Misread.

MP2
20/05/2012, 04:32 PM
I've reverted to an older version.