We can help more if you post the code that is causing the problem. Before you post, be sure to read Nick Gammon's two posts at the top of the Forum on the use of code tags when posting code to the Forum.
It means you have an if statement at a location where an if statement is not valid (because there's an unqualified-id before it).
Look before the line with the error, and also pay attention to any other errors you might have gotten, which might be pointing to the exact problem. It's usually semicolons (or lack thereof, rather), or screwed up parens/brackets/braces, or flat out wrong stuff.