For failure of the plaintiff to prosecute or to comply with this code or any order of court, a defendant may move for dismissal of an action or of any claim against him. After the plaintiff has completed the presentation of his evidence, the defendant, without waiving his right to offer evidence in the event the motion is not granted, or in the event that the motion is granted and the resulting judgment is later held erroneous, may move for a dismissal on the ground that upon the facts and the law the plaintiff has shown no right to relief.
§ 510.140, RSMo