BARRE — A Plainfield man with 14 previous convictions has agreed to a deal on his most recent list of charges, including burglarizing a camp in Marshfield in September, which gives him the choice of completing treatment court or going to jail.

Louis N. Scott, 29, pleaded guilty to felony burglary, driving with a suspended license, four counts of violating conditions of release, possession of a narcotic, possession of marijuana and resisting arrest in Washington County criminal court Tuesday.

As part of the deal, Scott was given an option of “door A” or “door B.” Door A involves accepting the resisting arrest conviction with a one-year deferred sentence and completing treatment court, in which case all other charges would be dismissed.

If Scott quits treatment court or is kicked out, then he gets “door B.” That would convict him of all the charges he pleaded to Tuesday, and he would serve six months to five years in prison.

Scott awaits sentencing on the agreement until he is accepted into treatment court. Judge Thomas Zonay made sure Scott understood that if the deal does happen as constructed, then he cannot back out and change his pleas if treatment court does not work out.

According to the Vermont State Police affidavit for the burglary charge, Scott broke into a camp on Hardwood Mountain Road and stole several boxes of ammunition. Scott was caught by neighbors of the camp who blocked off the road so he couldn’t drive away, police said.

After his arraignment on that charge, Scott was charged with several instances of violating conditions of release, including violating his curfew twice and having a hunting knife in November, and violating his curfew and possessing marijuana in separate incidents in December.

As a result of the plea agreement, five charges of violating conditions of release, a cocaine possession charge, and a charge of possession of marijuana were dropped.

Scott has previous convictions for grand larceny in 2005; driving with a suspended license in 2010, 2009, 2005 and 2004; contempt of court twice in 2008; marijuana possession in 2008; marijuana sale in 2007; leaving the scene of an accident in 2005; retail theft in 2004; attempt to elude in 2004; negligent operation in 2004; and driving under the influence in 2002.