
363 So.2d 42 (1978)
Melvin Lee VITKO, Appellant,
v.
STATE of Florida, Appellee.
Nos. 78-536, 78-645.
District Court of Appeal of Florida, Second District.
October 6, 1978.
Jack O. Johnson, Public Defender, and Paul C. Helm, Asst. Public Defender, Bartow, for appellant.
Robert L. Shevin, Atty. Gen., Tallahassee, and Michael A. Palecki, Asst. Atty. Gen., Tampa, for appellee.
RYDER, Judge.
Appellant contends that the trial court erred in adjudging him guilty of aggravated assault. We agree.
On January 4, 1978, the State filed a two-count information charging appellant with attempted robbery and battery. The attempted robbery count read as follows:
[Appellant] by force, violence or assault, or putting RODDIE SMITH in fear, willfully and against the will of said RODDIE SMITH, did attempt to take money or other property from his person or custody with intent to permanently deprive the said RODDIE SMITH of said money or other property, the said RODDIE SMITH being lawfully entitled to possession of the said money or other property, to wit: lawful money of the United States of America, and during the course of the aforesaid offense, the said MELVIN LEE VITKO did carry a deadly weapon, to wit: a knife; contrary to Chapter 812.13, and against the peace and dignity of the State of Florida. (Emphasis supplied)
After the court denied a motion to dismiss, appellant pled guilty to battery and went to trial on the attempted robbery count. At trial, the court granted appellant's motion for a judgment of acquittal as to attempted robbery and sent the case to the jury on a theory of aggravated assault. The court also instructed the jury over appellant's objection on aggravated battery, and it was that crime of which the jury found appellant guilty. However, after further consideration, the court voided the aggravated battery conviction and adjudged appellant guilty of aggravated assault, sentencing him to ninety days in prison for battery and six months to five years in prison for aggravated assault. The court also assessed costs against him. This timely appeal followed.
We believe that appellant's conviction for aggravated assault cannot stand. A defendant may not be convicted of a lesser included offense of the crime charged if the information under which he is tried does not allege all the elements of that offense. See Brown v. State, 206 So.2d 377 (Fla. 1968). Here, the information did not allege all the elements of aggravated assault. *43 An aggravated assault occurs when a person commits assault with a deadly weapon or with intent to commit a felony. Section 784.021, Florida Statutes (1977). The information alleged only that appellant carried a deadly weapon, not that he assaulted the victim with a deadly weapon.[1] Moreover, nowhere did it allege assault with intent to commit a felony.
We also think that the court erred in assessing costs against appellant. Once a court has declared a defendant to be insolvent, as it did in this case, it may not assess costs against him. Cox v. State, 334 So.2d 568 (Fla. 1976).
Appellant has presented two other points, but our disposition of the case makes it unnecessary to consider them further. Accordingly, we affirm the battery conviction and reverse the judgment and sentence for aggravated assault. We also reverse the order assessing costs to appellant, and remand the case for proceedings consistent with this opinion.
HOBSON, Acting C.J., and OTT, J., concur.
NOTES
[1]  Apparently the author of the language used in the attempted robbery count of the information was attempting to track Section 812.13(2)(a) wherein one carrying a firearm or other deadly weapon during a robbery would be treated, if convicted, as having committed a robbery of the first degree, so that had appellant been convicted of attempted robbery of that degree the penalty of that attempt would be commensurably greater.
