# Missing number treated as zero in quiz questions

When I make quizzes for my lab my code complies, but i get a "Missing number treated as zero error" on each question and subpart. It's been happening for weeks and drive me crazy. Code below:

\documentclass{exam}

\pagenumbering{gobble}
MATH 1426: Quiz 5 \\
\today
}{% center - blank
}{% right
Name:\enspace\makebox[2in]{\hrulefill}
}

\begin{document}

% Quiz instructions
\begin{center}
\parbox{5.5in}{\centering\itshape Answer each of the following questions.}
\end{center}

% Quiz questions
\begin{questions}

\question
An object thrown vertically upward from the surface of a celestial body at a velocity of 12 ​m/s reaches a height of $s(t)=-0.6t^2+12t$ meters in $t$ seconds.
\begin{parts}
\part
Determine the body's velocity after $t$ seconds?
\part
When does the object reach its highest point?
\part
What is the height of the object at the highest point?
\part
When does the object strike the ground?
\part
With what velocity does the object strike the ground?

\end{parts}

\end{questions}
\end{document}

• why was this tagged beamer ? – David Carlisle Oct 4 '17 at 16:29
• As far as I can see, the page number appears nowhere on the printed pages, so \pagenumbering{gobble} is useless. Remove it. – egreg Oct 4 '17 at 17:15
• David Carlisle: I was working on a beamer at the same time as this short quiz and accidentally put beamer for some reason... – enlimbo Oct 5 '17 at 18:06

the class is using the page number somewhere internally but you used the form

\pagenumbering{gobble}


which was never a supported numbering style and it removes a number from where a number was expected.

Almost certainly the class should be using the value of the counter rather than its print form, but currently it clearly does not.

The exam class only prints the page number if the page style headandfoot (default) or foot is selected. With \pagestyle{head} you already suppress it, so \pagenumbering{gobble} (that should never be used anyway) is useless.

You can even suppress the page number in the headandfoot or foot style by issuing \cfoot{}.

Just remove \pagenumbering{gobble} and the document will compile regularly.