We reverse the order revoking defendant’s probation because the trial court failed to advise him of his right to counsel.1 See Hicks v. State, 452 So.2d 606 (Fla. 4th DCA 1984). The court also erred by imposing a sentence of 4 years, 3 months and 21 days. This sentence exceeds the four-year cap on terms of incarceration for defendants designated as youthful offenders. Brandle v. State, 406 So.2d 1221 (Fla. 4th DCA 1981). Additionally the court erred by refusing to grant credit for the 513 days *1136which the defendant served in prison on the split sentence prior to his release on probation in July, 1983. See Villery v. Florida Parole & Probation Commission, 396 So.2d 1107 (Fla.1980).
Accordingly, the order of revocation is reversed, the sentence is vacated and the cause remanded with directions to hold a revocation proceeding at which the defendant is advised of his right to counsel.
REVERSED AND REMANDED.
HURLEY and WALDEN, JJ., concur. GLICKSTEIN, J., concurs in result only.. We specifically note that the order of revocation was not invalid on jurisdictional grounds. See Clem v. State, 9 F.L.W. 1868 (Fla. 4th DCA Aug. 29, 1984).