Export the sucker to LaTeX and run it directly. If that shows the error you remove, step by step, everything that does not contribute to the error until you have a small document which reproduces this, which you then post somewhere...
It's clearly MikTeX related :-)-O el on 2014-09-16, 15:20 Annaert Jan said the following: > When I try to compile a KOMA-script article document with numbered > sections, I always get the errors > > Extra \else. > > Extra \fi. > > When I change the section in the not-numbered equivalent section* > compiling works without problems. I am using LyX 2.1.0 with MiKTeX 2.9 > on Windows 7. (On a Mac OS X machine, both versions compile without errors.) > > Does anybody know what might go wrong? I attach a MWE. > > Thanks, > > > > Jan Annaert > > >