post some more of the code. it could be any number of things. most likely its whatever you are doing right before that line. either another block of code is not being properly ended or maybe that end if is unnecessary.
Well, I just removed those "end ifs" and now everything is working fine. I just added them in because it said it was expecting them, and now I had to remove them to get rid of the same error. Whatever I do it wants the opposite!