
149 Cal.App.2d 638 (1957)
THE PEOPLE, Respondent,
v.
JOHN CARROLL, Appellant.
Crim. No. 5801. 
California Court of Appeals. Second Dist., Div. One.  
Apr. 1, 1957.
 John Carroll, in pro. per., for Appellant.
 Edmund G. Brown, Attorney General, and William E. James, Deputy Attorney General, for Respondent.
 WHITE, P. J.
 Appellant John Carroll appeals from an order of the Superior Court of Los Angeles County denying his petition for a writ of error coram nobis.
 The record herein reflects that in 1931 an amended information was filed by the District Attorney of Los Angeles County wherein appellant Carroll and one Joseph Evans were accused of the crime of robbery. As to appellant herein, four prior felony convictions were alleged, as follows: burglary in the county of Los Angeles in October, 1923; grand theft in Los Angeles in October, 1923; burglary, third degree, and larceny in the District Court of the State of Kansas, County of Johnson on September 14, 1917; and breaking jail, a felony, in the District Court of the State of Kansas, in and for the County of Johnson, on September 13, 1917. As to each prior felony conviction alleged, it was also charged that appellant served a term of imprisonment therefor in a penal institution.
 Appellant was duly arraigned and entered a plea of not guilty. Following a trial by jury, appellant Carroll and defendant *640 Evans were found guilty of robbery as charged and it was found to be robbery in the first degree. The court found appellant to be an habitual criminal and he was sentenced to imprisonment in the state prison at Folsom for the term prescribed by law for the crime of robbery of the first degree with prior convictions of burglary, grand theft, burglary, third degree, and larceny and breaking jail.
 Judgment was entered October 19, 1931.
 It appears that no appeal was taken from the judgment and appellant does not contend to the contrary.
 Almost 25 years later, on August 28, 1956, appellant Carroll filed in the Superior Court of Los Angeles County a document denominated by him as "For the Writ of Error Coram Nobis" and in which he averred that "the prior convictions for which he was adjudged an habitual criminal do not embrace the intendment of the Legislature as defined under Section 644(b) of Penal Code." In support of his contention appellant argues that, "Said prior convictions, (see Exhibit (A) of case No. 45674) do not as of now, constitute an Habitual Criminal as defined under Section 644(b) of the 1949 California Penal Code; under said Section one must serve three or more Sentences seperately, see In re Brees (1950), 99 Cal.App.2d 328 [221 P.2d 756]."
 "Petitioner has been in but two Prisons prior to the present Commitment and has served but two terms or sentences as embraced by Section 644."
 [1] From the order of the court below denying the writ petitioned for, appellant prosecutes this appeal.
 It is now settled law in this state that the writ of error coram nobis is limited in its objectives. The writ is designed to bring to the attention of the trial court errors of fact, which, without negligence on the part of the accused, were not presented to the court at the time of trial. The writ in question was never intended to redress an irregularity occurring at the trial which could be corrected on motion for a new trial or by an appeal.
 The function of the writ was thus epitomized in People v. Martinez, 88 Cal.App.2d 767, 771 [199 P.2d 375]: "The writ of error coram nobis never issues to correct an error of law, nor to redress an irregularity occurring at the trial that could be corrected on motion for new trial or by appeal. It is issued to correct an error of fact, existing at the time of trial but unknown to the trial court through no fault of the petitioner, and which fact, had it been known, would *641 have resulted in a different judgment, or would have prevented the rendition of the challenged judgment. (Citing cases.)" (See also People v. Tuthill, 32 Cal.2d 819, 821 [198 P.2d 505].)
 [2] In the instant proceeding, if the judgment that appellant Carroll was an habitual criminal was not supported by the evidence, the fact was known to him at the time such judgment was entered and could have been corrected on appeal or by a motion for a new trial. We are satisfied that this question cannot be reviewed on its merits in this proceeding. It was a question of issuable fact and mixed law and fact which was before the trial court when the judgment was pronounced. And upon a motion for a new trial or upon a direct appeal from a judgment, had such an appeal been taken, could have been raised therein (People v. Moore, 9 Cal.App.2d 251, 253 [49 P.2d 615]; People v. Whitton, 112 Cal.App.2d 328, 332 [246 P.2d 60]; People v. Ingles, 97 Cal.App.2d 867, 871 [218 P.2d 987]; People v. Herod, 112 Cal.App.2d 764, 766 [247 P.2d 127]; People v. Dunlop, 102 Cal.App.2d 314, 316-318 [227 P.2d 281]). [3] For an appellant to be entitled to a writ of error coram nobis he must show at least that he could not have discovered the facts he alleged at any time substantially earlier than at the time of his petition for the writ (People v. Adamson, 34 Cal.2d 320, 326 [210 P.2d 13]). [4] Since its purpose is to secure relief where no other remedy exists, it is incumbent upon a convicted person to take advantage of every remedy provided by law to defeat the judgment pronounced against him.
 [5] Another feature of this case should be mentioned and that is the failure of appellant to make any pretense of diligence or of excuse for his negligence in waiting for over 24 years before attempting to set aside a judgment by a remedy of limited scope. In the absence of such showing the court below was obliged to deny the petition for that writ (People v. Emery, 99 Cal.App.2d 173, 174 [221 P.2d 223]). The reason for this rule and the necessity for it is cogently set forth in People v. Martinez, supra, p. 773, 774 (see also People v. Collins, 97 Cal.App.2d 552, 556 [218 P.2d 87]; People v. Lumbley, 8 Cal.2d 752, 761 [68 P.2d 354]; People v. O'Connor, 114 Cal.App.2d 723, 727, 728 [251 P.2d 64]; People v. Krout, 90 Cal.App.2d 205, 209 [202 P.2d 635]).
 [6] Appellant suggests on this appeal that his petition *642 in the court below might have been misnamed and that a petitioner "who establishes a right to relief under a form of writ different from that sought will be granted such relief in the form of the proper writ." The answer to this is that if the petition in the court below were to be treated as a petition for writ of habeas corpus it was misdirected to the Los Angeles County Superior Court by the appellant who is allegedly restrained of his liberty in the county of Sacramento (Cal. Const., art. VI,  5) and no appeal would lie from the denial of such a petition for a writ of habeas corpus (Pen. Code,  1506).
 For the foregoing reasons, the order from which this appeal was taken is affirmed.
 Doran, J., and Fourt, J., concurred.
