error 267: 'elseif': Requires ANSI-style prorotype.
It's often best to post a number of source lines, with the error line somewhere in the middle - and to point out clearly which line gives the error.
Only by seeing the source lines will people be able to help figuring out where the compiler might have "gone wrong" - i.e. processed the source code in a different way than you expected because of an error on your part.