[Tex/LaTex] Multiple Missing number, treated as zero. and Illegal unit of measure (pt inserted). on \section

errorsincompatibilitykoma-scripttitlesec

I'm writing with TeXStudio, and create pdfs with "pdflatex.exe -synctex=1 -interaction=nonstopmode "Fallout Equestria – Torn Skies".tex"

I updated with the MikTex. Before everything went just fine. Now I keep getting these errors:

Missing number, treated as zero. \subsection{Preface +}
Illegal unit of measure (pt inserted). \subsection{Preface +}
Missing number, treated as zero. \subsection{Preface +}
Illegal unit of measure (pt inserted). \subsection{Preface +}

The Main file looks like this:

\input{FormatDigital.tex}
\input{header.tex}
\input{definition.tex}

\begin{document}
    \AddToShipoutPicture*{\BackgroundPic}
    \fontfamily{\familydefault}
    \null
    \thispagestyle{empty}
    \addtocounter{page}{-1}
    \newpage
    \setcounter{page}{0}
    \tableofcontents
    \pagebreak
    \setcounter{chapter}{-1}
    With the usual slight crackling static of Old World Technology, the Holotape player comes to life, lighting up controls, buttons and the Screen of a Stable-Tec terminal. After the usual boot screen, instructions flare up:\\
    \terminalscreen{    
        \termline{Files marked with a - are pure text.}
        \termline{Files marked with a + are audio recordings.}
        \termline{Files marked with a * are audio-visual recordings.}
        \termline{Files marked with a \# are Rapid Inject Memory Recordings (R.I.M.R.).}
        \termline{}
        \termline{Always make sure to use the proper interface for the different file types.}
        \termline{Please keep the R.I.M.R. interface properly maintained and sanitary}
        \termline{to prevent infections, injuries and fatal brain damage.}
        \termline{}
        \termline{Enjoy!}
    }
    \renewcommand{\chaptername}{Directory}
    \chapter{Introduction}
        \section{Preface +}
            \input{Content/Vorwort.tex}
...
\vfill
Last Edit: \today
\end{document}

FormatDigital:

\documentclass[11pt,a4paper,oneside,titlepage,emulatestandardclasses]{scrbook}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\renewcommand{\familydefault}{\sfdefault}

header:

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[autostyle=true]{csquotes}
%Ancors in der Inhaltsangabe
\usepackage[pdftex,
    pdfauthor={Silver Fire},
    pdftitle={Fallout Equestria - Torn Skies},
    pdfsubject={},
    pdfkeywords={Fallout Equestria, sidefic, gore, grimdark, alternate universe},
    pdfproducer={Latex with hyperref},
    pdfcreator={pdflatex}]{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}
%Titelbild
\usepackage{graphicx}
\usepackage{eso-pic}
%Alle sections auf neuen Seiten anfangen
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}


% Schusterjungen und Hurenkinder vermeiden
\clubpenalty = 10000
\widowpenalty = 10000 
\displaywidowpenalty = 10000

and definition:

\author{Silver Fire}
\title{Fallout Equestria}
\subtitle{Torn Skies}
\date{}%entfernt das datum aus dem titel

\renewcommand{\>}{\textgreater}

\newcommand{\termline}[1]{\>\space #1\\}

\newcommand{\terminalscreen}[1]
{
    \begin{quote}
        #1
    \end{quote}
}

\renewcommand{\familydefault}{\sfdefault}

\newcommand\BackgroundPic{
    \put(0,0){
        \parbox[b][\paperheight]{\paperwidth}{
            \vfill
            \centering
            \includegraphics[width=\paperwidth,height=\paperheight,
            keepaspectratio]{Images/Title.png}
            \vfill
        }}}

Wall of code, I know. Sorry for that. I'm not that firm with LaTeX as I'd like to be. If requested I can provide the complete source for error checking.

Best Answer

The reason can be found in the log file:

Class scrbook Info: Deactivating the titlesec workaround, (scrbook) because package is newer than expected on input line 4.

There was an update of package titlesec. If you really want to use the new version together with a KOMA-Script class you have to install the prerelease of version KOMA-Script version 3.20. There the titlesec workaround is activated for titlesec 2016/03/21 v2.10.2 too. See also Fehler bei Verwendung von titlesec (German).

Update KOMA-Sript Version 3.20 was released on 2016/05/10. It is on CTAN, in MiKTeX 2.9 and in TeX Live 2016.

Suggestion without titlesec

But you can ensure that a section starts on a new page without package titlesec: redefine \sectionlinesformat to insert a \clearpage before section headings.

\documentclass[oneside,titlepage,emulatestandardclasses]{scrbook}[2015/10/03]
\usepackage{blindtext}%\dummy text

\renewcommand{\familydefault}{\sfdefault}

\makeatletter
\renewcommand{\sectionlinesformat}[4]{%
  \ifstr{#1}{section}{\clearpage}{}%
  \@hangfrom{\hskip #2#3}{#4}%
}
\makeatother

\begin{document}
\blinddocument
\addsec{Test}
\end{document}

enter image description here

Related Question