
603 So.2d 1320 (1992)
Rick DANZY, Appellant,
v.
STATE of Florida, Appellee.
No. 91-1059.
District Court of Appeal of Florida, First District.
August 7, 1992.
*1321 Nancy A. Daniels, Public Defender, and Carl S. McGinnes, Asst. Public Defender, Tallahassee, for appellant.
Robert A. Butterworth, Atty. Gen., and Sara D. Baggett, Asst. Atty. Gen., Tallahassee, for appellee.

ON MOTION FOR REHEARING GRANTED
PER CURIAM.
We grant appellant Danzy's motion for rehearing, withdraw our opinion of July 2, 1992, and substitute the following therefor.
Rick Danzy appeals his criminal convictions, revocation of probation, and sentences in five circuit court cases numbered 88-85, 88-90, 88-91, 88-138, and 90-3106. We affirm in part and reverse in part for the following reasons.
In case number 88-85, Appellant pleaded nolo contendere and was adjudicated guilty of attempted first-degree murder and escape in violation of section 944.40, Florida Statutes. The court withheld imposition of sentences and placed Appellant on probation for concurrent two-year periods to run concurrently with sentences imposed in cases numbered 88-91 and 88-131.
In case number 88-90, Appellant pleaded nolo contendere and was adjudicated guilty of armed robbery with a weapon and aggravated assault. The court withheld imposition of sentences and placed Appellant on probation for concurrent two-year periods to run concurrently with those imposed in cases numbered 88-91 and 88-131.
In case number 88-91, Appellant pleaded nolo contendere and was adjudicated guilty of armed robbery with a weapon, attempted murder with a weapon, and shooting into a building. The court withheld imposition of sentences and placed Appellant on probation for concurrent two-year periods to run concurrently with that in case number 88-138.
In case number 88-138, Appellant pleaded nolo contendere and was adjudicated guilty of two counts of armed robbery with a weapon and shooting into a building. The court sentenced Appellant to a four-year term of imprisonment on the first robbery count and placed him on probation for two years to run concurrently with the periods in the other counts mentioned.
All of these adjudications and sentences occurred in 1988. Thereafter, in 1990 while on probation, Appellant was charged in case number 90-3106 with battery causing great bodily harm. Soon thereafter, violation of probation affidavits were filed in all of the 1988 cases based on the aggravated battery charge. After a jury trial on the charge in case number 90-3106, Appellant was found guilty of aggravated battery. In March 1991, the court entered judgments of conviction and sentences in that case and all of the 1988 cases. In case number 90-3106, the court sentenced Appellant to imprisonment for fifteen years. In case number 88-85, the court imposed concurrent six-year terms of imprisonment on both counts to run concurrently with the sentence in case number 90-3106. In case number 88-90, the court imposed concurrent six-year terms of imprisonment to run concurrently with those imposed in cases numbered 88-85 and 90-3106. In case number 88-91, the court imposed concurrent six-year terms of imprisonment to run concurrently with the sentences imposed in cases numbered 88-85, 88-90, and 90-3106. In case number 88-138, the court imposed concurrent six-year terms of imprisonment to run concurrently with those in the other cases. The court ordered revocation of probation in cases numbered 88-85, 88-91, and 88-138.
*1322 Appellant raises six sentencing errors on this appeal. The point raised in case number 88-91 is without merit and is rejected. Some points in the other cases require discussion, however, and we address each of these contentions under the case in which it has been raised.

Case No. 88-85
Appellant's first contention is that the judgment incorrectly classifies the nature and severity of the escape charge. Count two of the information charged that Appellant "did unlawfully attempt to escape from JUVENILE DETENTION CENTER while under the lawful custody of the authorized officers of the HRS by virtue of committment [sic] by a Circuit Court, contrary to Section 944.40, Florida Statutes." (Emphasis added.) Appellant points out that section 944.40 provides that escape from an adult prison or jail is a second-degree felony, while escape from a juvenile detention facility is a third-degree felony under section 39.112. Since the judgment characterizes Appellant's conviction on this count as a second-degree felony rather than a third-degree felony, Appellant argues, the six-year sentence of imprisonment imposed on the escape charge exceeds the five-year statutory maximum for third-degree felonies and is illegal. Appellant contends this is fundamental error that must now be corrected. The state responds that Appellant pleaded to a violation of section 944.40 and did not appeal that adjudication of guilt on that charge when it was made in 1988, and thus should not now be heard to complain as he has waived this defect.
The factual allegations in count two are sufficient to state a violation for escape from a juvenile detention facility, but they clearly do not allege escape from an adult prison or jail. For this reason, Appellant's admitted escape is governed by section 39.112, not section 944.40. When allegations of fact in an information are sufficient to allege all the elements of an offense, such allegations of fact will ordinarily control over an erroneous reference to a statute, so that the reference to section 944.40 in the instant case should be treated as a scrivener's error. See Janes v. State, 585 So.2d 424, 425 (Fla. 1st DCA 1991) (where count of information charged conspiracy to traffic cocaine but cited section 893.13 as authority therefor rather than section 893.135(1)(b), which was applicable statute, statutory citation was scrivener's error given factual description of charge); King v. State, 336 So.2d 1200, 1202 (Fla. 2d DCA 1976), cert. denied, 345 So.2d 424 (Fla. 1977) ("Where the information clearly charges an offense, a mere error in the citation of the statute violated does not require reversal unless the error would prejudice the accused"); Youngker v. State, 215 So.2d 318, 322 (Fla. 4th DCA 1968) (erroneous statutory citation in information would not render conviction invalid where the information clearly charged an offense and there is no showing that the erroneous citation misled the defendant to his prejudice, and erroneous citation may be considered surplusage). See also Sanders v. State, 386 So.2d 256 (Fla. 5th DCA 1980). The maximum statutory sentence that could be imposed for this charge of escape, a third-degree felony, is five years' imprisonment. § 775.082, Fla. Stat. (1987). The sentence to six years on this charge is manifestly error. Even though Appellant did not complain of this error when originally adjudicated and given probation in 1988 (considering the sentence, he had no reason to complain), the characterization of the offense of escape as a second-degree felony in the appealed judgment and the sentence to six years' imprisonment amounts to the imposition of an illegal sentence and is fundamental error that may be raised on this appeal. See Williams v. State, 500 So.2d 501 (Fla. 1986) (defendant cannot acquiesce to an illegal sentence); Ivey v. State, 516 So.2d 335 (Fla. 1st DCA 1987) (trial court cannot impose an illegal sentence pursuant to a plea bargain); Perkins v. Mayo, 92 So.2d 641 (Fla. 1957) (defendant cannot be indicted on one offense and convicted for another, even though the offenses are closely related or of the same general character). See also Lentz v. State, 567 So.2d 997, 998 (Fla. 1st DCA 1990) ("An error in sentencing that causes a defendant to be incarcerated for a greater *1323 length of time than the law permits is fundamental, and can be corrected on appeal or by the trial court in collateral proceedings"). For these reasons, we vacate the sentence on the escape violation charged in count two and remand for resentencing thereon.

Case No. 88-90
First, Appellant contends that the sentence to six years' imprisonment on the aggravated assault charge, a third-degree felony, is erroneous because it exceeds the five-year statutory limit. See §§ 784.021 and 775.082(3)(d), Fla. Stat.(1987). The state correctly confesses error on this point. We vacate this sentence and remand for resentencing on this charge.
Next, Appellant contends that the sentences entered in this case were based on his violation of probation, but the lower court failed to enter a written order revoking his probation. Again, the state correctly confesses error on this point. See Brewer v. State, 583 So.2d 814 (Fla. 1st DCA 1991) (order revoking community control reversed and remanded where it contained no specific findings and failed to specifically state reasons for revocation). This sentence is vacated and the cause remanded for entry of an appropriate order on revocation of probation and resentencing.

Case No. 88-138
In this case, Appellant contends it was error to describe his conviction of the offenses charged in counts I and II as first-degree felonies rather than second-degree felonies. This contention is based on the fact that those counts charged him with attempted robbery with a firearm, not armed robbery with a weapon as stated on the judgment form. Robbery with a firearm and robbery with a weapon are first-degree felonies, while attempted robbery with a firearm and attempted robbery with a weapon are second-degree felonies. §§ 777.04(4)(b), 812.13(2)(a) and (b), Fla. Stat. (1987). We reject the state's argument that Hoover v. State, 530 So.2d 308 (Fla. 1988), requires us to affirm the characterization of these offenses on the judgment form as first degree felonies, as that would require approval of Appellant's having apparently pleaded to a more serious offense than he was charged with. The supreme court's decision in Hoover only approved the defendant's plea to a lesser degree offense than that charged in the information.
Accordingly, the trial court is instructed to correct this judgment on remand to reflect that the offenses to which Danzy pleaded are second degree felonies, not first degree felonies.
AFFIRMED IN PART, REVERSED IN PART, AND REMANDED.
SMITH, ZEHMER and WEBSTER, JJ., concur.
