- You aren't using parserAutoStrings.pl or unionLists.pl, so there is no need to load either one.
Your definition of the compoundProblem() is incorrect, since it lists too many parts, and not enough totalAnswers. (There are not 10 parts, and they are many more than 4 total answers.) You also don't need to set parserValues to 1, since you haven't used named answers and so no values are being set from previous parts.
You do not need the Context()->texStrings or Context()->normalStrings, since you are not substituting any MathObjects into the text strings anywhere.
In part 1 you set the context to LeadingZeros and set its reduceConstants flag, but then set the context to LeadingZeros again before creating any MathObjects. That means you lose the reduceConstants that you set.
In part 2, the Context("TF") in the answer section needs to be moved to the beginning of the problem. Where it is now it does nothing, since no MathObjects are created after that, and the earlier String() calls will fail because there is no "T" or "F" in the context that is current at the beginning of the part.
In part 4, the Context("TF") in the answer section is superfluous.
In part 6, the Context(Numeric) is missing the quotation marks around Numeric, and is superfluous since the str_cmp doesn't care about the current context.. As a matter of form, I would prefer to see you use Real() and Formula() in the same way you have used String(): use them when you define the answer, not in the ANS() call. So rather than
$ans1 = 2; ... ANS(Real($ans1)->cmp);I would write
$ans2 = Real(2); ... ANS($ans1->cmp);just as is the case with your true/false answers.
Davide