Using Tools + Auto Format would have allowed you to see the missing curly brace AND made your code easier to read. I recommend that you become familiar with this tool, and use it often.
Thank you all, guys.My led chase effect is ready. And also thank you for the extra tips. And PaulS what do you mean by "Tools + Auto Format". I don't get you.
Ufoguy:
Thank you all, guys.My led chase effect is ready. And also thank you for the extra tips. And PaulS what do you mean by "Tools + Auto Format". I don't get you.
At the top of your IDE, there is a menu "Tools" that you can click and then select the Auto Format to fix your formatting.
Ufoguy:
What does the Tools + Autoformat button do? Does it automattically format the code and solve errors(at least some)? Excuse me for my ignorance.
That would be nice 8), but all it does is lay out your code in a consistent way that makes missing "{" and "}" more obvious.
It doesn't solve any problems. It tries to indent the code correctly. It gets some things wrong, in my opinion, like array initialisations spread over two lines, but mostly does a good job. If open and close braces can't be matched, it just fails with a 'too many/not enough' error message. It can also fail, with the same error, even when there isn't a mismatch, which sometimes means there is some other issue, but I can't work out under what conditions it happens.