I am trying to add an appendix with Matlab scripts in my thesis. I have used the post about it here.
In my main.tex I have added:
\usepackage[T1]{fontenc}
\usepackage{bigfoot} % to allow verbatim in footnote
\usepackage[numbered,framed]{matlab-prettifier}
....
\part*{Appendices}
\chapter{Matlab scripts}
\input{matlab_scripts.tex}
\end{document}
then in matlab_scripts.tex ( appendix file):
\section{Realisation the algorithm 1}
\begin{filecontents*}{ algorithm.m}
function [a,b] = algorithm(c,d)
% matlab script of the function
\end{filecontents*}
\let\ph\mlplaceholder % shorter macro
\lstMakeShortInline"
\lstset{
style = Matlab-editor,
basicstyle = \mlttfamily,
escapechar = ",
mlshowsectionrules = true,
}
\lstlistoflistings
\lstinputlisting{algorithm.m}
I am using TexStudio and it doesn't build me pdf file without giving an error. Without this appendix, it works perfectly. Where Have I mistaken?

EDIT 1:
I have fixed the error below as:
\section{Realisation the algorithm 1}
\begin{filecontents*}{ algorithm.m}
function [a,b] = algorithm(c,d)
% matlab script of the function
\end{filecontents*}
\lstinputlisting{algorithm.m}
C:\Users\User\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makepk.log)? – Marijn Mar 03 '20 at 09:15