For the following MWE:
\documentclass[a4paper,12pt,addpoints]{exam}
\usepackage[]{geometry}
\usepackage{lipsum,graphbox,mdframed,array,ragged2e,booktabs,fmtcount,multicol,multirow,tabularx,cellspace,calc,tcolorbox,tikz,calc,fmtcount,etoolbox,soul}
\pagestyle{headandfoot}
\firstpagefooter%
{}%
{%
\hrule\vspace{2pt}
\begin{minipage}[t][][t]{0.5\textwidth}
text
\end{minipage}%
\begin{minipage}[t][][t]{0.5\textwidth}
\flushright Page \thepage\ of \numpages%
\flushright\vspace{\baselineskip}Please Turn Over \begin{tikzpicture}[baseline=-\the\dimexpr\fontdimen22\textfont2\relax]\draw[-latex,line width=4pt] (0,0) -- ++(10mm,0);\end{tikzpicture}%
\end{minipage}%
}%
{}
\begin{document}
\begin{questions}
\question
\lipsum
\end{questions}
\end{document}
, this error shows up when drawing the tikz arrow
Font \nullfont has only 7 fontdimen parameters.
However, when removing the tikz drawing of the arrow in the footer
\firstpagefooter%
{}%
{%
\hrule\vspace{2pt}
\begin{minipage}[t][][t]{0.5\textwidth}
text
\end{minipage}%
\begin{minipage}[t][][t]{0.5\textwidth}
\flushright Page \thepage\ of \numpages%
\flushright\vspace{\baselineskip}Please Turn Over
\end{minipage}%
}%
{}
the error disappers.
So, I have two questions:
1- What causes this error when drawing the arrow?
2- Why isn't the arrow vertically aligned with the inline text as shown below?



\the\dimexpr\fontdimen22\textfont2\relax? that is accessing param 22 of nullfont which isn't defined. – David Carlisle Nov 01 '18 at 07:45