
841 P.2d 597 (1992)
Floyd C. HARRIS, Appellant,
v.
STATE of Oklahoma, Appellee.
No. F-91-123.
Court of Criminal Appeals of Oklahoma.
November 6, 1992.
Ralph Saenz, Lawton, Trial Counsel, for appellant.
J. Blake Dutcher, Jr., Lawton, Appellate Counsel, for appellant.
Dick W. Tannery, Dist. Atty., Lawton, Trial Counsel, for appellee.
Robert H. Henry, Atty. Gen., Diane L. Slayton, Asst. Atty. Gen., Oklahoma City, Appellate Counsel, for appellee.


*598 OPINION
LUMPKIN, Vice-Presiding Judge:
Appellant Floyd C. Harris was tried by jury and convicted of First Degree Murder in violation of 21 O.S. 1981, § 701.7, in the District Court of Comanche County, Case No. CRF-84-130. The jury recommended punishment at life imprisonment and the trial court sentenced accordingly. It is from this judgment and sentence that Appellant appeals. We affirm.
On March 13, 1984, Appellant and Robert Wilson robbed Brittain's Catalog Showroom in Lawton, Oklahoma. During the robbery, Don Thomas, area manager, was shot and killed. See Wilson v. State, 756 P.2d 1240 (Okl.Cr. 1988), for details of the offense. In this appeal, Appellant has not challenged the sufficiency of the evidence, but objects to certain procedural matters which occurred in bringing his case to trial.
Appellant was arrested on March 13, 1984, and charged with the offense of robbery with a dangerous weapon. An agreement was reached between Appellant and the District Attorney that in exchange for *599 Appellant's information concerning Robert Wilson's participation in the robbery and murder, he would receive conditional limited immunity from prosecution. This limited immunity was based upon Appellant's successful fulfillment of four (4) conditions: 1) that Appellant tell who actually fired the gun and committed the homicide at Brittain's; 2) that Appellant give a sworn statement in regards to all events that occurred at the time of the robbery; 3) that he successfully take a polygraph examination; and 4) that he testify in all proceedings against the person who fired the weapon during the robbery.
At a hearing before the Honorable Winston Raburn, District Judge, on March 14, 1984, all parties agreed to the above and Appellant was granted conditional limited immunity from prosecution. Judge Raburn reminded Appellant that if he breached the agreement in any way, the grant of immunity would be null and void and the State could proceed with criminal charges. The State informed Appellant that if he did breach the agreement, first degree murder charges would be filed. On April 16, 1984, a polygraph test was conducted on Appellant. The results of that examination showed that Appellant did not answer the questions posed to him truthfully. Upon receiving this information, the State filed first degree murder charges against Appellant.
On April 25, 1984, the preliminary hearing was held before the Honorable Allen McCall, Special Judge, and Appellant was bound over for trial on charges of first degree murder. Appellant's challenge to the revocation of the limited immunity and re-instatement of criminal charges against him was heard by the Honorable Jack Brock, District Judge, in a pre-trial motion hearing on May 24, 1984. After hearing testimony from the polygraph examiner and the State's investigator, Judge Brock ruled that the immunity which was granted was based upon certain conditions, those conditions were breached, and therefore, Appellant was not entitled to immunity from prosecution. On September 20, 1984, three (3) months after the trial of Robert Wilson, Appellant was tried and convicted of first degree murder.
In his first assignment of error, Appellant contends that the magistrate erred in failing to grant his request for a continuance of the preliminary hearing. Appellant argues that forcing him to proceed with the preliminary hearing, only one day after the appointment of counsel to the case, deprived him of his constitutional right to effective assistance of counsel.
The record reflects that Ralph Saenz was appointed on April 24, 1984, to represent Appellant. On the day set for the preliminary hearing, April 25, 1984, Mr. Saenz verbally requested the continuance. The magistrate overruled the motion stating in part:
I understand and appreciate the fact that you were appointed yesterday. However, it's the Court's opinion that preliminary hearing for the defendants is a time to discover the State's case. That is the main purpose in my eyes. And that's exactly what we're here for today. If for some reason there are witnesses which you were unable to subpoena, some other reason why you can't get a witness here, newly discovered evidence and so forth, I will allow you an additional day, somewhere in a couple weeks, to have those witnesses brought into the courtroom. However, I do not see any of the reasons shown as a justification for a continuance of the hearing today and tomorrow. We're going to proceed to examine the witnesses.
A motion for a continuance must be accompanied by an affidavit in compliance with 22 O.S. 1981, § 584 and 12 O.S. 1981, § 668. West v. State, 798 P.2d 1083, 1086 (Okl.Cr. 1990). The decision to grant a continuance of a preliminary hearing is within the sound discretion of the examining magistrate. Harper v. District Court of Oklahoma County, 484 P.2d 891, 897 (Okl.Cr. 1971). See also Fisher v. State, 668 P.2d 1152, 1155 (Okl.Cr. 1983). A preliminary hearing is conducted for the benefit of the accused. Beaird v. Ramey, 456 P.2d 587, 589 (Okl.Cr. 1969). It is to serve as a means of discovery for the defendant *600 and not as a substitute for trial. Hampton v. State, 501 P.2d 523, 527 (Okl.Cr. 1972).
Here, Appellant neither set forth his request for a continuance in writing nor supported it with an affidavit. This omission in itself is fatal. West, 798 P.2d at 1086. Further, he has offered no evidence of prejudice resulting from the denial of the continuance. He has produced neither additional witnesses nor newly discovered evidence. In light of the magistrate's grant of additional time, if necessary, and in consideration that the preparation necessary for preliminary hearing is not as great as that required for trial, we find no abuse of discretion in the denial of the continuance.
Combined with his request for a continuance of the preliminary hearing, Appellant also requested a hearing on the revocation of the grant of immunity. The magistrate overruled the motion, finding that the preliminary hearing could continue even with that issue unresolved. In his second assignment of error on appeal, Appellant alleges that the magistrate erred in failing to rule on his motion and that this failure to rule on questions of law properly before him was a failure to fulfill the duties of his office, resulting in material prejudice to Appellant.
In Nuckols v. VanWagner, 511 P.2d 1110, 1112 (Okl.Cr. 1973), this Court held that a special judge sitting as a magistrate did not have the jurisdiction to grant immunity from prosecution in a felony case. This holding was based upon the limited jurisdiction of special judges at that time as set forth in 20 O.S. 1971, § 123. The Court in Nuckols discussed the effect of judicial reorganization which created one district court with general jurisdiction. Id. As a result of that reorganization, Oklahoma has two categories of judges of the district court: (1) judges with general jurisdiction, District Judges and Associate District Judges; and (2) judges with limited jurisdiction set forth by statute, Special Judges. Since its inception, Section 123 has been amended eleven (11) times and the jurisdictional authority of special judges expanded. See 20 O.S. 1991, § 123. Specifically, Section 123, Subdivision A(6) provides that special judges shall perform the duties of magistrates in criminal cases. See 22 O.S. 1981, § 258 et seq. This includes examining all evidence material and relevant to making the statutory determination of whether a crime has been committed, and if so, whether there is sufficient cause to believe that the defendant is the person that committed the crime. 22 O.S. 1981, § 264. See also Wyrick and Hutchinson v. District Court of Mayes County, 839 P.2d 1376 (Okl.Cr. 1992).
As addressed in the next proposition, immunity from prosecution is a complete defense to a criminal charge, and not merely a pre-trial motion. Therefore, a special judge sitting as a magistrate has the authority to rule on the question of immunity, as a complete defense to the charge, when making the determination required by 22 O.S. 1981, § 264, whether "there is sufficient cause to believe the defendant guilty thereof". To the extent that Nuckols is inconsistent with this opinion, it is hereby overruled. In the present case, the ruling of the special judge to proceed to preliminary hearing without ruling on Appellant's motion did not constitute an abdication of judicial responsibilities. Any error in holding a separate hearing on the motion was harmless at best as the statute merely empowers the special judge to hear such matters as a part of the jurisdiction of the office; it does not require that such matters be heard at once. Therefore, we find that Appellant was not prejudiced by the court's ruling and this assignment of error is denied.
In his third assignment of error Appellant contends that 1) the grant of limited immunity was improperly revoked by a unilateral decision of the District Attorney; and 2) the order of the District Court denying the limited immunity was erroneous as it failed to apply the correct evidentiary standard to determine whether or not the agreement had been breached by the Appellant.
Appellant correctly notes that our state statutes and case law provide little guidance regarding the procedural manner in *601 which a grant of immunity, once made, is revoked. In addition, the perceived procedure for the grant of immunity is generally based on cases decided prior to court reorganization which were determined based on the limited jurisdiction of inferior courts. Most of the jurisdictional issues, as regards the ability of different types of judges to grant immunity, have been resolved through the establishment of a single district court with general jurisdiction and judicial officers empowered with general jurisdiction authority.
The Texas Court of Criminal Appeals has also been required to address this type of issue. As is the case in Oklahoma, the statutes in Texas are void of an enacted procedure for either the grant or revocation of immunity. In Zani v. State, 701 S.W.2d 249 (Tex.Cr.App. 1985), the Texas Court of Criminal Appeals addressed the revocation of a grant of immunity. That court noted "[s]ince immunity agreements seek not only to avoid convictions but to avoid prosecutions as well, it is necessary to challenge indictments in such a way as to avoid the trial itself." Id. at 253. Therefore, a motion to dismiss the information due to a grant of immunity is an appropriate means of challenging a prosecution prior to trial.
In the present case, Appellant properly challenged the prosecution. However, contrary to his initial argument, the record shows that the grant of immunity was revoked by the District Court which granted it. Although it is preferable to hold the hearing on the District Attorney's motion to revoke the agreement prior to the preliminary hearing, the hearing was held prior to trial and we find no fundamental error.
The court in Zani further addressed the determination of the level of proof which must be met in dealing with the enforcement of immunity agreements and upon whom the burden of meeting that level of proof must be placed, stating:
The initial burden is on the defendant to show the existence of an agreement by a preponderance of the evidence. (cite omitted) In this respect it differs from ordinary defenses where the defendant is only required to raise his defense by producing some evidence. However, once the initial burden is met and the existence of an immunity agreement is shown by a preponderance of the evidence, we hold that, procedurally, immunity should be treated just like a defense under the Code. Thus, the burden then shifts to the State to show beyond a reasonable doubt why the agreement is invalid or why prosecution should be allowed despite the agreement. 701 S.W.2d at 254.
While we find the court's reasoning and disposition of the issue illuminating, we hereby adopt the following, more detailed, procedures for use in this State:
1. When a judge of the district court is requested by the State to grant conditional immunity to an individual, the State shall present to the judge a written agreement setting forth the conditions upon which the grant of immunity will be based.
2. The judge shall conduct a hearing, with a certified court reporter present and preserving a record of the proceedings; wherein the judge reviews the agreement and conditions for the requested grant of conditional immunity and inquires of the State and the person for whom immunity is requested as to their understanding of the terms of the agreement. If the judge determines the evidence and law supports the acceptance of the agreement, the judge may approve the request and grant the conditional immunity.
3. The judge shall reduce the grant of conditional immunity to a written order, which may be filed under seal upon the order of the court, and file it in the case.
4. Upon the acceptance and granting of the conditional grant of immunity, the agreement is in effect, subject only to an application to revoke the agreement being filed by the State. Subsequent to the grant of immunity, the ability of the State to proceed with prosecution on the charges to which immunity is granted is stayed.

*602 5. If the State seeks to vacate the conditional grant of immunity, an application to revoke shall be filed setting forth sufficient facts to give notice to the court and the person receiving the conditional immunity as to the conditions of the agreement which have not been met or breached.
6. Upon receipt of the application to revoke, the court shall set a date for hearing on the application and order notice of the hearing be served upon the State and the person receiving the conditional immunity.
7. At the hearing, the agreement approved by the court, together with the record of the hearing granting immunity, is deemed admitted by the parties and the State has the burden of proving by clear and convincing evidence why the agreement should be invalidated and prosecution should be allowed. The person receiving the conditional grant of immunity shall be afforded the opportunity to present evidence in contravention of the State's application to revoke.
8. At the conclusion of the hearing, the court shall enter an order setting forth findings of fact and conclusions of law as to whether the State has met its burden of proof and whether the agreement is vacated or remains in force. If the agreement is vacated, the State may commence criminal prosecution. If the court finds the State has not met its burden of proof, the agreement remains in full force and effect.
In the present case, the existence of the agreement was not an issue as both parties admitted that the agreement not to prosecute existed. The State was then required to prove that the agreement was unenforceable and should be vacated.
As the grant of immunity was based upon Appellant's successful completion of four (4) conditions, the failure to comply with any one of the conditions was sufficient to warrant revocation of the grant of immunity. The State presented the testimony of Robert Hanks, a certified polygraph examiner, who stated that he had given approximately eighteen hundred (1800) polygraph examinations and in his opinion, the results of Appellant's polygraph showed that Appellant did not truthfully answer the questions posed to him. On cross-examination, the specific questions and answers comprising the polygraph examination were reviewed. Based upon our review of the record, we find that the court properly found that Appellant had not truthfully answered the questions posed to him at the polygraph examination, and that he had therefore breached the agreement under which he was granted limited immunity.
In his final assignment of error, Appellant contends that it was improper to base the grant of immunity upon a condition, namely the successful taking of a polygraph examination, which has been found inherently unreliable and not admissible evidence at trial. Appellant is correct in stating that the results of polygraph examinations are not admissible at trial as the results have been found to be potentially unreliable. Weatherly v. State, 733 P.2d 1331 (Okl.Cr. 1987); Young v. State, 670 P.2d 591 (Okl.Cr. 1983) citing to Leeks v. State, 95 Okl.Cr. 326, 245 P.2d 764 (1952). However, the State did not seek to have the results of the polygraph admitted at trial. Appellant was required to undergo such an examination merely for purposes of discovery and investigation. The value and usefulness of the polygraph examination as an instrument of investigation, albeit excluding the test results from admission at trial, has been recognized by this Court. Leeks 245 P.2d at 771; Henderson v. State, 94 Okl.Cr. 45, 230 P.2d 495, 504 (1951). We do not find it improper for the grant of limited immunity to have been based in part on the successful taking of a polygraph examination.
Further, the Appellant cannot now be heard to complain that the grant of immunity was improperly based upon a condition to which he agreed. It is well established that a party may not complain of error which he himself invited or waived. Staggs v. State, 719 P.2d 1297, 1299 (Okl. Cr. 1986); Maynard v. State, 625 P.2d 111, *603 113 (Okl.Cr. 1981). Accordingly, this assignment of error is denied.
Accordingly, for the foregoing reasons, the judgment and sentence of the trial court is AFFIRMED.
LANE, P.J., and BRETT, PARKS and JOHNSON, JJ., concur.
