
    Paul BETTY, Appellant, v. STATE of Florida, Appellee.
    No. 4D08-3528.
    District Court of Appeal of Florida, Fourth District.
    March 11, 2009.
    Paul Betty, Okeechobee, pro se.
    No appearance required for appellee.
   PER CURIAM.

Paul Betty appeals the denial of a rule 3.800(a) motion to correct an illegal sentence. We affirm the denial but for reasons different from those argued by the State and adopted by the trial court. We also write to correct a misstatement of law in Major v. State, 900 So.2d 759 (Fla. 4th DCA 2005), that has led to some confusion in this case.

Betty was convicted of attempted robbery with a deadly weapon and sentenced as a habitual felony offender to thirty years in prison. Citing Major, the State has argued that this offense is a first degree felony, and as a habitual offender, Betty could be sentenced up to life in prison.

Contrary to what we said in Major, which was dicta and did not directly control the outcome of the case, this court, and other districts, have consistently ruled that attempted robbery with a deadly weapon is a second degree felony. See Whidden v. State, 374 So.2d 543, 545 (Fla. 2d DCA 1979) (discussing the robbery statute and concluding that attempted robbery with a deadly weapon is a second degree felony as provided in the attempt statute, section 777.04); see also Williams v. State, 850 So.2d 656 (Fla. 1st DCA 2003) (citing Whidden and recognizing that attempted armed robbery is a second degree felony); Lopez v. State, 781 So.2d 473 (Fla. 3d DCA 2001) (recognizing that attempted robbery with a deadly weapon is a second degree felony); Westbrook v. State, 617 So.2d 782 (Fla. 4th DCA 1993) (directing the trial court to correct the judgment, which erroneously stated that attempted robbery with a deadly weapon was a first degree felony, when it is a second degree felony); Arthur v. State, 391 So.2d 338 (Fla. 4th DCA 1980) (citing Whidden and agreeing that attempted robbery with a firearm is a second degree felony). Robbery with a deadly weapon is a first degree felony punishable up to life in prison. § 812.13(2)(a), Fla. Stat. (1989). The attempt to commit a life felony or first degree felony is a felony of the second degree. § 777.04(4)(b), Fla. Stat. (1989).

Betty was convicted of a second degree felony, and as a habitual offender, he could be sentenced up to thirty years in prison. § 775.084(4)(a)2., Fla. Stat. (1989). Because his sentence is legal, we affirm the denial of his motion.

Ajfmned.

GROSS, C.J., STEVENSON and TAYLOR, JJ., concur. 
      
      . Betty's motion was denied in part because the trial court agreed with tire State that the law of the case doctrine barred this motion. The State argued that "the law of the case is that the sentence in this matter is legal.” As Betty argued in his reply, this is not an accurate statement of law. The law of the case doctrine applies only if the defendant is raising the same legal issue and the issue was actually decided on appeal. State v. McBride, 848 So.2d 287, 289-90 (Fla.2003). The fact that a previous challenge to a sentence was denied and affirmed does not necessarily mean that the sentence is legal and does not prevent the defendant from raising a different legal error.
     
      
      . This subsection has been renumbered. § 777.04(4)(c), Fla. Stat. (2008).
     