2021-03-14, 12:04 PM
(2021-03-14, 02:08 AM)Y_Less Wrote: You can do that in an editor, you don't need a browser. But if the code is properly indented it should be obvious where the missing brace is.
I know. I just dismissed the hassle of downloading and installing an editor. I just wanted to at least know if he is missing any. If he is missing some brackets, then he can download and install an editor that actually shows where he is missing the brackets.
(2021-03-14, 03:41 AM)Boxi Wrote:(2021-03-14, 01:06 AM)Virsenas Wrote:
One of the possibilities could be that you accidentally removed { or } in the gamemode. 26 errors also show when you are missing them. You can try checking if you are missing one. You can do this quickly if you are using Firefox browser. Make a copy of the gamemode. Paste it on your desktop. Open the copied gamemode with Firefox and press Ctrl and put in { to search for. At the bottom it should show how many matches it found. After you see the number of the { matches, search for } and then check if the match numbers are the same. If they are not the same that means you are missing { or } somewhere in your code.
(2021-03-14, 02:08 AM)Y_Less Wrote: You can do that in an editor, you don't need a browser.? But if the code is properly indented it should be obvious where the missing brace is.
I tried to do it the first way with Firefox but when I searched it said "more than 1000 matches" then I thought of using Notepad and I got the following: (the result of the matches is in blue letters)?
Are 5 differences. Is this the problem?
Edit: And if so, is there any way to find those keys faster, so as not to go through the whole code again. Thanks for your answers :'D
Yes. The numbers have to be the same. I would just keep deleting parts of the gamemode and keep checking if the difference is still the same. I would probably first delete half of the gamemode and then check if the difference is the same. If it's the same, that means the deleted part of the code did not have a missing or an extra bracket. If you delete a part of the code and you see a change in the difference of the number then you can undo the deletion of the code and paste it in another empty file and keep deleting parts of that code also. But that's just me. You can try other things to help you with the missing brackets.
A few years ago I did have a tool that checked the curly brackets exactly for .pwn files. Someone in the sa-mp community I think created that tool. You would just drop the .pwn file on the tool. Then it would scan the file. It would show the number of opened and closed brackets and it would show the line at which the opened bracket is missing a closed bracket which either means it is actually missing a curly bracket or you have an extra one which was mentioned in the tool on that exact line. I'll try to dig up more and see if I can find it again.