Opinion by
Lewis, J., Beatty, C. J., and Johnson, J.,concurring.
The plaintiff brings this action to recover the sum of forty-two hundred and fifty-eight dollars, the value of a quantity of wood delivered to the defendant Uznay under the following contracts:
“ This agreement, made and entered into this twenty-sixth day of January, a.d. 1864, betAveen E. B. Horton of the first part, and Charles Uznay, party of the second part, witnesseth: That for and in consideration of one dollar paid by the party of the second part to the party of the first part, the receipt whereof is hereby acknowledged and the premises hereinafter stated, the party of the first part agrees to furnish to the Phoenix Mills all the Avood needed for both mills, *502i.e., number one and number two, on the following terms, namely: Until the first day of May, 1864,' at fourteen ($14) dollars per cord for wood without bark, and fifteen ($15) for Avood Avith bark in a dry state ; and from the first of May, 1864, until the first day of November at thirteen ($13) dollars per cord for wood without bark, and fourteen ($14) dollars per cord for wood with bark, but in a dry state, and to keep constantly on hand at the said mills not less than fifty ($50) cords at any one time. And the party of the second part agrees to pay for all the wood used at the above mills at the rates above specified, on the first and fifteenth day of each month for each and every cord consumed. And it is further agreed between the parties that should coal be offered for sale in the market, and should the party of the second part conclude to use coal instead of wood at the mills aforesaid, the party of the second part shall for such cause have the option of canceling this contract; but should the supply of coal be limited, and the mills be obliged to use wood to any extent, then the party of the first part agrees to furnish all the wood needed at both mills, as hereinbefore specified. Should said E. B. Horton fail to carry out this contract, he agrees to pay damages for his failure, liquidated and agreed on between both parties to this contract at one hundred ($100) dollars per day for each and every day that the mills are stopped on account of not being supplied as per this agreement.
“E. B. Horton,
“ Chas. Uznay.
“ Witness: H. V. S. McCullough.”
“ Virginia City, January 26,1864.
“ For and in consideration of one dollar to us in hand paid, and the foregoing premises, Ave hereby agree to pay the amount to be paid by the party of the second part to the foregoing agreement, should the said party fail to pay in accordance Aiith the agreements and terms of the foregoing contract.
“E. Ruhling & Co.”
It will be seen that Uznay agrees to take and pay for all the wood used and consumed at the íavo mills mentioned in the contract on the first and fifteenth of each month, and Ruhling & Co. guaranty the payment by him as stipulated in the agreement. Under this *503instrument, the defendants Ruhling and McCullough can certainly only be responsible for the fifty cords besides the quantity actually needed or consumed at the mills. Their guaranty cannot be extended beyond the strict letter of the principal contract. Uznay is of course liable for all the wood delivered to him, regardless of the use which he might make of it, but the guarantors only bind themselves to pay for fifty cords beyond what was actually needed or used in running the Phoenix Mills. No definite number of cords is agreed to be delivered by the plaintiff. The quantity which it was incumbent upon him to deliver was to be determined by the amount used or consumed by the mills. It is apparent, not only from the contract but from the testimony, that the liability of the guarantors did not extend beyond the value of the wood actually needed or consumed at the mills. Suppose no wood at all had been needed or consumed by these mills, it will hardly be claimed that the guarantors would be liable for all the wood which the plaintiff might have chosen to deliver to Uznay. As the quantity .consumed was the measure of their responsibility, it was indisputably necessary for the plaintiff to show by his complaint that the wood, the price of which he is seeking to recover, was not only delivered, but further that it was needed or used at the mills. As the guarantors were not liable to the plaintiff for the price of all the wood which he might deliver to Uznay, but only for the quantity thus needed or consumed by the mills spoken of, certainly there should be something to show what quantity, if any, was so used. If none were needed for the use of the mills, the plaintiff has no cause of action against the guarantors, although he may have delivered wood to Uznay. The complaint sets out the contract, but it is impossible to ascertain from it whether a single cord of wood was consumed or needed at the mills.
The plaintiff seems to have labored under the impression that the guarantors were responsible for the price of all the wood which he might choose to deliver to Uznay, and upon that assumption founds this action. In this he was in error. We conclude therefore with the Court below, that the complaint does not state facts sufficient to constitute a cause of action, and hence could not support a judgment in favor of the plaintiff. This being the case, the Court *504below should either have dismissed the action or given the plaintiff an opportunity to amend his pleading. By trying the case and rendering judgment upon the merits, the plaintiff might possibly be barred from bringing another action against the defendants, although his complaint in this cause utterly failed to state airy cause of action against them. As the complaint would not support a judgment in favor of the plaintiff, any error committed against him at the trial would not usually be considered prejudicial; but it may possibly be so, and when such is the case the error should be corrected. For example: if a judgment on the merits be rendered against a plaintiff, when it is clearly shown that the judgment dismissing his action would be the only proper judgment which' could be rendered against him, in such a case he would be prejudiced by the error, for the judgment on the merits could be pleaded as a bar to a second action for the same cause, while a simple dismissal of the case could not be so used against him. It would certainly therefore, be the duty of an Appellate Court to' modify the judgment so as to protect the plaintiff from any such result. A judgment in favor of the defendants for their costs in this action, and dismissing the complaint, would undoubtedly have been correct, and would not interfere with a second action by the plaintiff for the same case; but that a judgment on the merits should have been rendered against him is not by any means so certain. The only defense which seems to have been relied on by Ruhling and McCullough upon the trial was an agreement between them and the plaintiff whereby it was claimed they were discharged from all liability upon the contract of guaranty after the fourth day of May, A.D. 1864. That agreement, if entered into at all, was not completed until the fourth day of May. It was a new and independent contract, which if valid and operative, would relieve the guarantors from all liability under the guaranty. To produce that result it was necessary that the agreement relied on should possess all the elements of a valid contract. As that is new matter, in avoidance of the contract of guaranty, it should therefore have been specially pleaded by the defendants.
New matter which is simply an avoidance of the cause of action made out by the plaintiff should always be specially pleaded. Such *505is the rule declared by Chitty, and it is unchanged under the modern practice. (1 Chitty on Pleading, 615 ; 1 Van Sandtvoord’s Pleading, 469, et seq.~) The proof must be secundum allegata. No proof of new matter in avoidance can therefore be admitted unless it is so pleaded as to apprise the opposing party of the nature of the defense. There is no more reason why a defendant should be permitted to prove the execution of a contract the effect of which is to defeat the plaintiff’s action, without having pleaded it, than to allow the plaintiff to prove the execution and to recover upon a contract which he has not pleaded. In the answers filed by the guarantors in this case there is no reference whatever to the agreement by which they claim to have been discharged from the contract of guaranty. They simply deny the allegations of the complaint, and affirmatively allege that the plaintiff delivered no wood “ upon the credit or responsibility of the defendants Ruhling & Co. subsequent to the fourth day of May, a.d. 1864; that all the wood delivered after that time was delivered upon the sole credit and responsibility of the defendant Uznay, and not upon the contract of guaranty.” Doubtless under this answer the defendants would have been permitted to prove that the plaintiff abandoned the contracts after the fourth day of May, and delivered no wood upon them after that time; but they could not properly prove that the plaintiff entered into an agreement upon a sufficient consideration with them by which they were discharged from liability upon the guaranty. The learned Judge below however, permitted the defendants to prove such agreement notwithstanding the objections of plaintiff’s counsel, and upon that proof the following findings were, based, and upon them alone the judgment was rendered for the defendants:
“ On the third day of May, 1864, the plaintiff, at the request of the defendants Ruhling & Co., agreed that they should be discharged from further liability upon said guaranty, in consideration that they would pay him the amount unpaid and due him from Uznay for wood furnished by the plaintiff to Uznay under their said contract of sale and purchase, as well as three hundred and seventy-eight dollars, the price of the wood so furnished on the first, second and third of May, 1864, but not then due, all of which *506amounted to about $4,100, which amount was so paid to the plaintiff by Ruhling & Co., pursuant to such agreement.
“ No wood was furnished by the plaintiff or used at the Phoenix Mills after the third day of May, 1864, upon the credit of the said Ruhling & Co. The plaintiff has been fully paid for all wood fur-. nished by him and used at the Phoenix Mills prior to June 11th, a.d. 1864.”
Without proof of the agreement by which the guarantors claim to have been released, we are satisfied that a judgment dismissing the action and for costs was all that could have been rendered against the plaintiff. Such a judgment would not prejudice his right to bring another action, but the judgment rendered by the Court, and which we have shown was founded upon testimony improperly admitted, could possibly be used against him as a complete bar to any future action to recover the sum of money claimed in this action. He was therefore prejudiced by the proof of the agreement to discharge the guarantors, and the findings and judgment thereon.
Por these reasons we are compelled to direct a modification of the judgment, so that it shall be simply a dismissal at the plaintiff’s costs, without prejudice to another action.