I have fixed the sketch already, but a while ago i was getting this unusual message when the problem was simply not having curly brackets in the right place.
There is of course too much for a forum thread to explain so im basically asking if anyone has a good pdf on this layer of code in general
I have a shelf full of old-fashioned paper books. I recommend that you get some. Not everything is suitable for reading on the computer.
If you are having a hard time with the correct placement of curly brackets, you could consider changing the programming IDE.