
267 S.W.3d 796 (2008)
Charles LYNCH, Plaintiff/Appellant,
v.
MISSOURI DEPARTMENT OF CORRECTIONS, Defendant/Respondent.
No. ED 90685.
Missouri Court of Appeals, Eastern District, Division Four.
October 21, 2008.
*797 Charles Lynch, Bowling Green, MO, pro se.
Stephen D. Hawke, Assistant Attorney General, Jefferson City, MO, for respondent.
KATHIANNE KNAUP CRANE, Judge.
Plaintiff, a Missouri prisoner, appeals pro se from a judgment on the pleadings denying his petition seeking a declaration that he was entitled to credit under section 558.031.1 RSMo (2000)[1] for certain time he served in federal custody. We reverse and remand because the trial court's judgment was based on a misinterpretation of section 558.031.1.

PROCEDURAL BACKGROUND
Plaintiff, Charles Lynch, filed an action for declaratory judgment pursuant to section 558.031.1 against the Missouri Department of Corrections (MDOC) seeking credit for time he served in federal custody from February 28, 2003, to April 29, 2004, on the ground that this pre-conviction time in federal custody was related to the state offense for which he is now serving time. We take as true the facts contained in the petition and attached exhibits. These reveal that plaintiff was charged by both the state[2] and the federal government with crimes arising out of the February 27, 2003 robbery of a credit union. Plaintiff alleged that he was held in Missouri county jails in federal custody from February 28, 2003 until April 29, 2004, when he pleaded guilty to federal bank robbery charges and thereafter began serving a four-year sentence in federal prison, from which he was released on September 27, 2006. On February 2, 2007, plaintiff was sentenced to ten years imprisonment on each of two state charges, to be served concurrently with each other and with his federal sentences. Plaintiff thereafter requested that MDOC credit his state sentence with time spent in custody after his arrest on February 28, 2003, up until the time he pleaded guilty and received his federal sentence on April 29, 2004, but MDOC denied the request.
MDOC filed an answer to the petition, and thereafter filed a motion for judgment on the pleadings. The sole ground for its motion was that under section 558.031.1(2) plaintiff could be given credit only if his custody was "compelled exclusively" by the state of Missouri, and because plaintiff's custody prior to his federal conviction had been compelled by federal officials, he was not entitled to credit. The trial court granted MDOC's motion and entered a final judgment on the pleadings. The court concluded that the plain language of the exception set out in section 558.031.1(2) barred plaintiff from the relief he sought because he admitted in his allegations that *798 his custody during the time prior to his federal plea was not compelled exclusively by the state of Missouri but was also compelled by federal officials.

DISCUSSION
For his sole point on appeal,[3] plaintiff contends that the trial court erred in entering judgment against him because he was entitled to credit for the time served in Missouri county jails before he received his federal sentence in that, under section 558.031, the federal time served was "related to" his state conviction and sentences.
Rule 55.27(b) allows a party to file a motion for judgment on the pleadings. On appeal from a judgment on the pleadings in a defendant's favor, we review the allegations of the petition to determine whether the facts pleaded therein are sufficient as a matter of law. Garr v. Missouri Bd. of Probation & Parole, 211 S.W.3d 191, 192 (Mo.App.2007). We treat all well-pleaded facts in the petition as true. Id. We will affirm if the facts so conceded entitle the moving party to judgment as a matter of law, notwithstanding any evidence that might be produced. Id. This appeal turns on a question of law, whether subdivision (2) of section 558.031.1 prevents plaintiff from receiving the credit he seeks.
Section 558.031.1 provides:
1. A sentence of imprisonment shall commence when a person convicted of a crime in this state is received into the custody of the department of corrections or other place of confinement where the offender is sentenced. Such person shall receive credit toward the service of a sentence of imprisonment for all time in prison, jail or custody after the offense occurred and before the commencement of the sentence, when the time in custody was related to that offense, except:
(1) Such credit shall only be applied once when sentences are consecutive;
(2) Such credit shall only be applied if the person convicted was in custody in the state of Missouri, unless such custody was compelled exclusively by the state of Missouri's action; and
(3) As provided in section 559.100, RSMo.
When interpreting this statute, we are to ascertain "`the intent of the legislature from the language used and give effect to that intent, if possible, and to consider the words used in their plain and ordinary meaning.'" Mudloff v. Missouri Dept. of Corrections, 53 S.W.3d 145, 147-48 (Mo.App.2001) (quoting Roy v. Missouri Dept. of Corrections, 23 S.W.3d 738, 744 (Mo.App.2000)). Section 558.031.1 "plainly" allows credit for time spent in custody "`after the offense occurred and before the commencement of the sentence, when the time in custody was related to that offense . . . .'" Goings v. Missouri Dept. of Corrections, 6 S.W.3d 906, 908 (Mo. banc 1999) (quoting section 558.031.1) (emphasis in original). Plaintiff's position in the trial court was, and in this court is, that he is entitled to credit because his time in federal custody in Missouri county jails was related to his state robbery conviction.
*799 The trial court did not address whether plaintiff's federal custody prior to his federal conviction was related to his subsequent Missouri conviction. Rather, it determined that plaintiff's claim for credit was barred by the limitation set out in section 558.031.1(2). It concluded that subdivision (2) allowed a credit "only if his custody in the state of Missouri was `compelled exclusively by the state of Missouri's action[.]'" (emphasis added) It concluded that because plaintiff admitted that he was compelled to be held in the state of Missouri by federal officials, his custody in Missouri was not "compelled exclusively" by Missouri's action.
We disagree with the court's interpretation of subdivision (2). Subdivision (2) is a limitation on the credit granted in section 558.031.1. It restricts application of the credit to the situation in which the person convicted was in the custody of the state of Missouri, "unless such custody was compelled exclusively by the state of Missouri." (emphasis added) The word "unless" is a conjunction that, in this context, is defined as "except if." WEBSTER'S NEW WORLD COLLEGE DICTIONARY 1564 (4th ed.2001). The word "unless," as used in subdivision (2), signals an exception to the limitation in the first clause of subdivision (2). It does not signal a condition or further limitation. Specifically, it does not mean, as MDOC argued and the trial court concluded, that the limitation in subdivision (2) applies "only if" custody was compelled exclusively by the state of Missouri.
Mudloff, 53 S.W.3d 145, on which MDOC relies, does not support MDOC's argument that custody occurring in Missouri that is also compelled by non-Missouri authorities cannot qualify for credit under section 558.031.1(2). The portion of Mudloff that analyzed the current version of section 558.031.1 turned on whether the confinement "related to" the prisoner's conviction. 53 S.W.3d at 148. It did not discuss or apply subdivision (2) of the current section 558.031.1.
When "unless" is given its dictionary definition, the plain meaning of subdivision (2) is that the credit allowed in section 558.031.1 is limited to time spent in custody in the state of Missouri with one exception, when custody has been compelled exclusively by the action of the state of Missouri. This would allow a prisoner credit for time in related custody that was compelled exclusively by the action of the state of Missouri but was not spent in the state of Missouri. It does not require that the custody both be in the state of Missouri and be compelled exclusively by the state of Missouri.
MDOC did not plead an alternative ground in support of its motion for judgment on the pleadings, and it does not argue that there is any alternative basis to uphold the trial court's judgment. In this situation, we do not become advocates for defendant and develop a theory that defendant did not make and does not argue. See May Dept. Stores Co. v. Adworks, Inc. 740 S.W.2d 383, 386 (Mo.App.1987). See also Thomas v. DeGrace, 776 S.W.2d 500, 501 (Mo.App.1989). The trial court erred in entering judgment on the pleadings in MDOC's favor on the ground that plaintiff could be given credit only if his prior custody was "compelled exclusively" by the state of Missouri. Point one is granted.

Conclusion
The judgment on the pleadings in MDOC's favor is reversed and the case is remanded.
BOOKER T. SHAW, P.J. and MARY K. HOFF, J., concur.
NOTES
[1]  All further statutory references are to RSMo (2000).
[2]  The complaint on the state charges was filed on March 4, 2003, and the indictment on the state charges was handed up on June 11, 2003.
[3]  Plaintiff's point and argument also assert that his plea agreement with the state contained a promise of credit. Plaintiff did not make this allegation in his petition. This issue may not be raised for the first time on appeal. Atlanta Cas. Co. v. Stephens, 825 S.W.2d 330, 333 (Mo.App.1992).
