On ■' September 13, 1952, appellants, Badger Hovermale and wife, Margaret, sued appellee, Central Kentucky Natural Gas Company, for $7,280.49 damages : alleged to have been done their farm of 38.17 acres in Nicholas County by reason oí a breach of contract by appellee in laying a pipeline on it. When appellants refused to comply with an order of the court directing them to make adjoining landowners and an independent contractor parties defendant, their petition was dismissed and this appeal followed.
The petition as amended averred appellants and the company on July 31, 1951, entered into a written contract whereby in consideration of $49 appellants granted the company the right of way for an additional pipeline the company was to lay on their lands, and the contract was filed as an exhibit with the petition. In this contract the company agreed to pay all damages done appellants’ farm by reason of laying the line and the company was to refill and reseed the ditch in which the line was laid. Appellants averred certain damages done their land by reason of the alleged breach of the contract by the company and by reason of the negligence of the company in performing the contract.
In September 1953, there, was an order entered that the case be practiced under the old Civil Code. In October following and before filing answer, the company moved that appellants be required to elect whether they would prosecute their action in tort or for breach of contract. This motion was sustained and appellants elected to prosecute for breach of contract. Some complaint is made by appellants of this ruling, but we think it is correct since under § 83 of the Civil Code one might not properly join a cause of action ex contractu with one purely ex delicto. Price v. Whitaker, 273 Ky. 499, 117 S.W.2d 203.
The company’s answer averred that on May 6, 1946, through its predecessor, it entered into a contract with appellants for a right of way over their land to lay a pipeline and this contract granted it the right within 10 years to lay an additional pipeline along side of the first “upon the payment of' the price above mentioned ($46) for each additional line to be laid.”' It is further averred in this pleading the second contract was without consideration and was entered into by the company under duress and is void.
The answer further averred the pipeline was constructed, .by an independent contractor. and any damage done appellants’ farm was by this independent contractor who should' be made a party defendant; that Walter Shepherd and wife, Adeline, owned property, adjoining appellants and the Shepherds and appellants both are claiming title to certain parts of the land over which the company constructed its line, especially that part where the gate valves are located, and the Shepherds should be made parties defendant. The company filed a formal motion stating the rights of the parties in this suit could not be determined unless the Shepherds were made parties defendant and asked that plaintiff be required to make them such. The company by way of counterclaim asked $10,000 damages caused it by appellants’ delaying the subcontractor in refusing to let work start on their farm.
Appellants’ general demurrer to the answer and counterclaim was overruled and it was ordered that appellants make the Shepherds and the independent contractor parties defendant. Appellants thereupon filed a “response” to the court’s opinion and order. .
Appellants refused to comply with the order to make the Shepherds and the independent contractor parties defendant, whereupon the court dismissed their petition under § 28 of the Civil Code of Practice. This code section provides that if the court cannot determine any cbntro-versy before it without prejudice to others, it must require such other persons to be made parties or must dismiss the action without prejudice. Also § 371, subd. 2(d) of the Civil Code provides the court may dismiss a cause without prejudice where *138plaintiff disobeys a court’s order concerning the proceedings in the action.
We hold the court erred in ordering the independent contractor to be made a party defendant since the contractor stood in the shoes of the company, which latter was liable for the acts of the contractor in laying this line. But the Shepherds are necessary parties to the action since both they and appellants are claiming certain portions of the land on which the line was laid, and certainly the company is entitled in this action to know who is the owner of the land on which it constructed its line and whether it is to appellants or the Shepherds it should pay damages, if there were any damages. City of Louisa v. McClure, 245 Ky. 158, 53 S. W.2d 337; Hazard Coal Corp. v. Getaz, 234 Ky. 817, 29 S.W.2d 573, 578.
However, under §§ 28 and 371, subd. 2(d) of the Civil Code the order dismissing the petition should have been without prejudice. True, appellants’ counsel drafted an order directing an absolute dismissal of the action, and we usually hold that where a party invites an error, he cannot complain of it. Wathen v. Mackey, 300 Ky. 115, 187 S.W.2d 1000, 1004. But in this instance the court did not enter the order tendered by counsel for appellants and as it would work such a hardship on appellants to dismiss the action, we think it proper to reverse the judgment so appellants may have their day in court. However, it is nothing but fair that appellants should pay the cost of this appeal because they refused to comply with the simple order of the court to make the Shepherds parties defendant and because they invited the error in the court’s order by tendering one calling for an absolute dismissal instead of one for dismissal without prejudice. True, the court erred in ordering the independent contractor to be made a party defendant, but this could prejudice no one.
There is no merit in appellants’ contention the court erred in overruling their general demurrer to that part of ap-pellee’s answer which pleaded there was no consideration to support the contract sued on and it was obtained by duress. An examination of this pleading shows it contains sufficient averments of no consideration and of duress. Whether or not the company can prove same is not now before us.
For the reasons given the judgment is reversed with directions that appellants make the Shepherds parties defendant but they not be required to make the independent contractor a party defendant. The cost shall be taxed against appellants.