This should be a simple thing, but everywhere I've looked says what I have should work I think. After doing this for a few hours I'm calling it and asking for someone to point out the stupid mistake.
Here's my code:
\newenvironment{questions}[1]{
\stepcounter{QuestionGroup}
}
{
\ifthenelse{\isempty{#1}}
{
0
}
{
#1
}{}
}
When I try to compile this, it gives me the "Illegal parameter number in definition of \endquestions." And moreover it works just fine if I change all the #1 to some filler content, so it's not registering that the [1] should be an optional argument input.
So... what gives?