We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Too Many Right parentheses (Read 2181 times)
Too Many Right parentheses
Apr 5th, 2008, 5:29am
 
Auto Format Cancelled: Too Many Right parentheses.

I get this message, and now I have 25 pages of code to check word by word for parentheses.

The editor should give some help here, may be indicating which lines have unmatching parentheses, or highlighting the matching parentheses blocks,
Re: Too Many Right parentheses
Reply #1 - May 15th, 2008, 5:00pm
 
Well, if you run your program, you will get a syntax error and the culprit line will be highlighted.
I tried in an example where I added a ), I got "expecting SEMI, found ')'" error.
Now, if your program isn't finished, you might have much more errors before this one...
The Auto Format algorithm could give a line number, I suppose.
Re: Too Many Right parentheses
Reply #2 - Jun 30th, 2008, 9:56am
 
I have the same problem and error message, auto format wont work anymore, but i checked it. My code runs and seems to be ok. Its not like i forget to close parantheses somewhere and get the error Philho mentioned. 
Re: Too Many Right parentheses
Reply #3 - Aug 2nd, 2008, 7:12pm
 
I get this a lot as well. And it is a bug I think (at least if you can compile and run the program but cannot auto-format).

In one particular case I went crazy trying to find it, so used a 'number guessing game' approach by continually copy/pasting half of the code tab to a blank tab and ctrl-t'ing till I found the offending function. When I finally found the offending function, I could not find any mismatching right paranthesis - it was a very short function with only one block (a tiny for loop).
So I just deleted the whole function and re-wrote it, and it worked, copy/pasted all the tabs into one tab and still auto-format works. So at some point the IDE must get confused about something which we cannot see - the question is how did that thing get there! (sometimes invisible characters come when you copy/paste from websites, I hadn't done that). Another weird thing is that the compiler can still compile and run the code, just the auto-formatter gets confused...
Re: Too Many Right parentheses
Reply #4 - Aug 6th, 2008, 2:16pm
 
I just got this error again, and identified the offending section to be pure comments! (with no mismatching parantheses)

bug 867
http://dev.processing.org/bugs/show_bug.cgi?id=867
Page Index Toggle Pages: 1