
762 So.2d 966 (2000)
James R. PARMINTER, Appellant,
v.
STATE of Florida, Appellee.
Nos. 2D98-3246, 2D98-854.
District Court of Appeal of Florida, Second District.
May 31, 2000.
John Liguori, Bartow, for Appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Patricia A. McCarthy, Assistant Attorney General, Tampa, for Appellee.
CASANUEVA, Judge.
In this appeal James R. Parminter asserts that the trial court committed three errors. His first contention-that the trial court erred in denying his motion for judgment of acquittal on the charge of possession of cocaine-is without merit, and we affirm his conviction. His second and third contentions are that the trial court erred in revoking his probation and in sentencing him on the cocaine charge. We reverse on those grounds.
When Mr. Parminter was convicted for possessing cocaine on September 19, 1997, he was on probation for an earlier offense. After his conviction, an affidavit of probation violation was filed against him. The affidavit did not mention the cocaine charge; instead, it asserted that Mr. Parminter violated his probation by physically pushing or battering his then girlfriend, Leanne O'Neal. No formal revocation hearing was held on this charge. At the sentencing hearing on the possession case, however, the trial court not only imposed sentence for that offense but also determined that Mr. Parminter had violated his *967 probation, revoked it, and imposed sentence.
In revoking Mr. Parminter's probation, the trial court committed two errors. First, a trial court is not permitted to revoke probation on conduct not charged in the affidavit of violation. See Harris v. State, 495 So.2d 243 (Fla. 2d DCA 1986). Here, because the affidavit failed to allege a violation of probation by the possession of cocaine, the trial court could not violate Mr. Parminter's probation on that basis.
Second, the general rule is that a trial on a new charge-here, the cocaine case-cannot be treated as a revocation hearing. See State v. Spratling, 336 So.2d 361 (Fla.1976); Reynolds v. State, 352 So.2d 1263 (Fla. 2d DCA 1977). This record contains neither a stipulation that the criminal trial would substitute for the revocation hearing nor a waiver of the right to a revocation hearing. Accordingly, we reverse the order revoking probation without prejudice to the State's ability to refile an appropriate affidavit alleging violations emanating from the cocaine case.
At sentencing, defense counsel argued that the scoresheet reflected an erroneously high point total because of improper scoring of one of Mr. Parminter's prior offenses. The court must determine on remand whether Mr. Parminter was previously convicted of purchase of cocaine within 1,000 feet of a school or of an attempted purchase within 1,000 feet of a school and must further decide the appropriate offense severity level. On appeal the State has suggested that the attempt to purchase cocaine within 1,000 feet of a school is a level 4 offense.
Finally, we note that the trial court improperly imposed a public defender lien even though the defendant was represented by privately retained counsel. Therefore, this cost must be stricken.
Affirmed in part; reversed in part; and remanded with instructions.
PARKER, A.C.J., and GREEN, J., Concur.
