• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] error 017: undefined symbol
#12
(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)?



[Image: PcSfMPQ.png]



[Image: 6xPhq6P.png]



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.
  Reply


Messages In This Thread
error 017: undefined symbol - by Boxi - 2021-03-13, 08:41 PM
RE: error 017: undefined symbol - by RhaegarX - 2021-03-13, 09:06 PM
RE: error 017: undefined symbol - by Boxi - 2021-03-13, 09:50 PM
RE: error 017: undefined symbol - by Radical - 2021-03-13, 10:05 PM
RE: error 017: undefined symbol - by Boxi - 2021-03-13, 11:47 PM
RE: error 017: undefined symbol - by Y_Less - 2021-03-13, 10:37 PM
RE: error 017: undefined symbol - by Boxi - 2021-03-13, 11:53 PM
RE: error 017: undefined symbol - by Virsenas - 2021-03-14, 01:06 AM
RE: error 017: undefined symbol - by Y_Less - 2021-03-14, 02:08 AM
RE: error 017: undefined symbol - by Boxi - 2021-03-14, 03:41 AM
RE: error 017: undefined symbol - by Y_Less - 2021-03-14, 11:45 AM
RE: error 017: undefined symbol - by Boxi - 2021-03-14, 01:37 PM
RE: error 017: undefined symbol - by Virsenas - 2021-03-14, 12:04 PM

Forum Jump: