Needle in a Haystack


I know this has been asked again and again, but...

I am working with a game file which contains 70,305 lines of code.

When trying to save the game, it threw an error in a command's script. That command's script began at line 50,939. I fixed that problem.

Now, when trying to save I get: Error: Missing ')'

Ha, ha, ha! Now, my question is this:

This missing parentheses has to be after line 50,939, since the save made it to that point previously. Correct? (I've changed nothing else.)

Your logic sounds impeccable.

ya, but hopefully you know which lines are your new lines with the error in it, lol (aka: for example, you might have adjusted/added code into line 50 which has the error, so it may not be somewhere after your 50,000'th line of code)

otherwise... probably the best method of tracking it down is to remove code, until you find the errors location, which then you can find it, more easily, and fix it


I edited only within the script that begins at line 50,939, so I was pretty sure it was after that.

The missing ) was on line 61,667.

I found a pretty nice way to find it.

Open the file in VIM, and use ].

I.e., I wanted to find an unmatched ( so, I opened the .aslx file in vim then I pressed these keys ] (, and VIM went straight to line 61,667!!! Awesomeness!!!!!

Interesting... Just had a look and there is a plugin for Notepad++ that will do that too, though I have not tried it.

I have been reduced to delewting huge chunks (after backing up!) to isolate an error. That then runs into issues with object references being wrong (a room has an exit to a room I deleted). Nowadays I try to remember to save in-game often to catch these errors fast. Putting stuff in libraries helps too; you can test the libraries on their own if you are carefuly what goes where.


I meant to mention that Notepad++ plugin. I tried that first, and it didn't work. (Maybe because of the XML format? I don't know.)

This topic is now closed. Topics are closed after 60 days of inactivity.