Error Function not found: ')'

I'm trying to "Find" ')' cause I assume that this is just stray text somewhere that the game thinks is a function but when I try to search for it in Code View it says it can't find this specific text. Is there a way to find it other than sifting through 40,000 lines of code? Thanks in advance!

Anonynn.


I feel your pain. I wish the game would tell you the name of the script that has the error when something like this pops up. But I've found that such things are usually in something that I recently edited, so I'd take a close look at the scripts that you've recently changed. If the error doesn't lie in something you've recently edited, and you don't have a clue as to where it is, you'll have to do some serious searching.

When I have a general idea where an error is, but I can't find it, I throw in a random line msg("check1") then a few lines down I add msg("check2"), and so on. I then run the game and make it run the troubled script. If the error occurs after "check1" prints on the screen, but before "check2" does, I know the problem lies between the two points, look for it, fix it, then remove all those "check" messages.


when you got a huge game code, probably the best you can do is:

.1. make a copy of your game

with the copy of your game:

.2. remove/delete the (upper or lower) half of your custom code of your game code (using 'divide and conquer' tactic: binary search, lol)

ht.tps://en.wikipedia.org/wiki/Binary_search_algorithm
ht.tps://www.khanacademy.org/computing/computer-science/algorithms/binary-search/a/binary-search

try to load your copy into GUI/Editor:

.3A. if no errors, then you know the error is within the half of code you removed/deleted. Do the same process with this error-filled half of code, and keep doing so, until you find and fix all the errors

.3B. if errors, then you know errors are within this half of code you didn't remove/delete. Keep doing this same process with this error-filled half of code, and keep doing so, until you find and fix all the errors

.4. scour through your smaller part of code with the error: you either got an extra right parenthesis somewhere and/or you're missing its left parenthesis and/or you got some other typo elsewhere which has shifted your code over, and now it's all messed up (likely causing lots of errors), but still you just have to find that 1 typo to re-align/shift the code back to being correct again.


or...

you could just slowly brute force through your code from top to bottom, making sure each code line you look at is correct. But, the above method is the fastest method.


or...

best method of all, create a code/program to do find the errors (and even better fix them) for you, lol. Have to be a really good programmer.


So scour it is. Wonderful. Thank you for taking the time to answer ^_^


I did something like what HK suggested, made a copy of my game and then started deleting code. I did a "targeted" deleting where I deleted individual scripts or sections of scripts where I thought the problem might be. Took a while, but I did eventually isolate the exact line where the problem was (turned out to be a bug that hopefully Pixie will eventually fix). But you just have to make intuitive guesses about what's causing the error and where it might be happening (easier said than done).

Proudly Humble's suggestion is good too.

Another thing: try to figure out under what specific circumstances does the error occur? Try to isolate when it happens versus when it doesn't. What is the difference between the two scenarios? You might then be able to infer or at least make educated guesses about what is going on. Then you can look at specific lines of code.


I have almost the exact same error but it only happens when I try to save the running game and I haven't hit the line of code during my gameplay yet. I'll have to do the scour method using an XML view in Notepad++ which does help show some colour coding.


best is prevention:

multiple progressive copies ("versioning"), that way, you can quickly identify your coding mistakes:

my_game_v1.aslx // no ERRORS
my_game_v2.aslx // ERRORS: okay whatever new code I added has the error(s) in it, and the previous code (seen in my_game_v1.aslx) is error free

there's software (free or paid) that does versioning for you: Github is a (free) website that does (free) versioning for you, but it's very confusing... at least for me... I don't understand it at all... sighs.


An errant bracket should be caught by the GUI. Check each script for red. Think about which might have fired when the error was reporred if it was not at the dtart of the game and obviously look at any you have changed recently. For big scriptd you may have to scroll down which is probably why you missed it at the time.


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

Support

Forums