THE STATE OF SOUTH CAROLINA
In The Court of Appeals
RIM Associates, a South Carolina general partnership, Respondent,
John E. Blackwell, Appellant.
Appeal From Charleston County
Roger M. Young, Circuit Court Judge
Opinion No. 3747
Heard October 8, 2003 – Filed February 23, 2004
Withdrawn, Substituted and Re-Filed May 14, 2004
G. Dana Sinkler, Mark S. Sharpe, Paul E. Tinkler, and R. Bruce Wallace, all of Charleston, for Appellant.
Richard S. Rosen and Daniel F. Blanchard, III, both of Charleston, for Respondent.
BEATTY, J.: RIM Associates, a South Carolina general partnership, sued John Blackwell, a partner, seeking contribution for a partnership debt the partnership had incurred as a result of a debt owed to Blackwell. The trial court ordered Blackwell to make a contribution. We reverse.
John Blackwell’s company, R.I. of North Charleston (“R.I.”), owned a Ramada Inn. In 1985, Everett Smith, Joe Edens and James Finley (“the partners”) decided to purchase the hotel. Blackwell agreed to sell the hotel for 4.575 million dollars. As part of the purchase price, R.I. accepted a note of 1.3 million dollars (“the Blackwell note”). Blackwell also received a twenty-five percent partnership interest in RIM Associates (“RIM”), the partnership formed by Blackwell and the partners “to invest in, own, and operate” the hotel. The partners financed the transaction by taking out a bank loan for the 3.275 million dollar balance owed to Blackwell. The partners did not place any capital in the transaction, but they guaranteed seventy-five percent of the Blackwell note.
RIM fell behind on its payments on the Blackwell note and, in 1989, Blackwell and RIM renegotiated its terms. Blackwell extended the maturity date of the Blackwell note and the partners guaranteed it one hundred percent. The parties contemporaneously entered into an indemnification agreement (“the 1989 agreement”) that provided in part:
The Partners acknowledge and agree that each Partner, as the owner of a twenty-five (25%) interest in the Partnership, is responsible for twenty-five (25%) of the Partnership indebtedness and each Partner agrees to indemnify and hold the others harmless from liability for such Partner’s share of any such indebtedness . . . .
Edens, Smith, and Finley have, in the Note Modification, agreed to jointly and severally guarantee the payment of the Note in its entirety. It is agreed, however, that the indebtedness evidenced by the Note and any other Partnership indebtedness in excess of the amounts above set forth shall remain Partnership debts, the payment of which shall continue to be the obligation of the Partnership, but Blackwell shall have no personal liability therefor other than to the extent of his interest in the Partnership and Edens, Smith and Finley shall not have the right to require contribution from Blackwell on account of any payment which they may have to make on the Note. Any such payment(s) shall be deemed to be a capital contribution(s) to the Partnership by the party making the same. 
Notwithstanding the 1989 agreement, RIM again fell behind on its payments. In 1997, Blackwell sued the partners for repayment as guarantors of the Blackwell note. The partners brought a third party complaint against RIM, seeking indemnification for the amounts due under the Blackwell note. The partners then caused RIM to bring suit against Blackwell seeking contribution from him in case RIM was required to indemnify the partners.
The parties reached a settlement in April or June of 1999 (“the 1999 settlement”). The 1999 settlement provided in part:
1) The guarantors would pay $2 million including principal, interest, attorney’s fees, and costs, to John and Hazel Blackwell. John and Hazel will satisfy the Note.
2) All of the pending litigation against John and Hazel Blackwell will be dismissed with prejudice.
3) John Blackwell will remain in the Partnership.
4) The Partnership will not attempt to borrow the money to pay John and Hazel except with the prior written approval of John Blackwell.
Following the court-ordered 1999 settlement, Blackwell moved to amend the order to include that “John Blackwell cannot be required to respond to a capital call as a result of the settlement found by the Court.” The judge refused, reasoning that “[the] issue may have been raised by [Blackwell] but it is a post-settlement issue and not properly before this court at this time.” On July 14, Edens and Smith paid two million dollars pursuant to the 1999 settlement. Finley did not contribute any funds. 
On August 5, the trial judge ordered “[t]he action . . . ended and dismissed with prejudice as [to] all parties.” RIM moved to amend the order. As a result, the trial judge rescinded that order and issued a second order that dismissed with prejudice all causes of action “by and against” Blackwell “asserted within the action,” all claims by RIM “in the Amended Fourth Party Complaint,” and all actions by Blackwell. The trial judge also dismissed all actions by the individual partners Eden, Smith, and Finley against RIM but without prejudice.
In April 2000, RIM sued Blackwell. RIM’s Amended Complaint claimed breach of the partnership agreement and sought contribution and specific performance. Following a bench trial, the court found:
The Partnership did not “borrow” the money to pay the settlement in violation of the settlement agreement and did not receive monies from Smith and Edens.
Blackwell was obligated to make a contribution to the Partnership to fund the expenses of his own settlement.
The 1989 agreement, which expressly prohibits any such contribution, had been rescinded by the Blackwell settlement.
The Partnership did not assert these claims in the prior litigation.
The Partnership claims were not barred by the dismissal with prejudice.
The Partnership was entitled to recover attorneys fees and costs.
The trial judge ruled that Blackwell had breached his contractual and statutory obligations to make contributions under the partnership agreement and the South Carolina Uniform Partnership Act. Blackwell appeals.
Blackwell raises eight exceptions to the trial judge’s rulings, but those exceptions can be condensed in the following six issues:
Did the trial court err in finding that the partnership was
authorized to bring this action?
Did the trial court err in holding that Blackwell could be
required to contribute to the payment of his own
Did the trial court err in not finding that the claims of the partnership had
previously been dismissed with prejudice?
Did the trial court err in not finding that the partnership borrowed the settlement
funds in violation of the settlement agreement and the 1989 agreement?
Did the trial court err in allowing this action without first requiring an accounting?
Did the trial court err in awarding attorneys’ fees to the partnership?
STANDARD OF REVIEW
RIM alleges two causes of action against Blackwell. RIM characterizes them as “Contribution” and “Breach of Contract / Specific Performance.” However, an appellate court is not bound by a party’s characterization of the actions. Klippel v. Mid-Carolina Oil, Inc., 303 S.C. 127, 129, 399 S.E.2d 163, 164 (Ct. App. 1990) (citing Ariail v. Ariail, 295 S.C. 486, 491, 369 S.E.2d 146, 149 (Ct. App. 1988)). Whether an action is at law or in equity is determined by the main purpose of the suit. Mortgage Recovery Fund-Riverbend, Ltd. v. Heritage Clipper Riverbend Trust, 327 S.C. 491, 493, 489 S.E.2d 655, 656 (Ct. App. 1997) (citing Baughman v. AT&T, 298 S.C. 127, 130, 378 S.E.2d 599, 600 (1989)). The court should determine the main purpose of an action from the body of the complaint. Carjow, LLC v. Simmons, 349 S.C. 514, 518, 563 S.E.2d 359, 362 (Ct. App. 2002) (citing Ins. Fin. Servs., Inc. v. South Carolina Ins. Co., 271 S.C. 289, 293, 247 S.E.2d 315, 318 (1978) (“The main purpose of the action should generally be ascertained from the body of the complaint.”)). “Whether the action is one at law or in equity is determined by the nature of the pleadings and the character of the relief sought.” In re Estate of Holden, 343 S.C. 267, 278, 539 S.E.2d 703, 709 (2000) (citing Bell v. Mackey, 191 S.C. 105, 119, 3 S.E.2d 816, 824 (1939) (“The nature of the issues as raised by the pleadings or the pleadings and proof, and character of relief sought under them, determines the character of an action as legal or equitable.”)).
Notwithstanding RIM’s characterization of its complaint, RIM alleges only one single cause of action for breach of contract and requests the remedy of specific performance.  An action for specific performance lies in equity.  Ingram v. Kasey’s Assocs., 340 S.C. 98, 105, 531 S.E.2d 287, 290 (2000); see also Barnacle Broadcasting, Inc. v. Baker Broadcasting, Inc., 343 S.C. 140, 146, 538 S.E.2d 672, 675 (Ct. App. 2000) (explaining that “[a]n action for specific performance [on a contract] lies in equity”). Because the action is in equity, the appellate court “may find facts in accordance with its own view of the preponderance of the evidence” in reviewing such an action. Id.
I. RIM’s authority to bring this action
Blackwell argues that the trial judge erred in ruling that RIM was authorized to bring this action against Blackwell. We disagree.
The partnership agreement states that “[i]f any Partner fails to make contributions to capital as provided for by the terms of this Agreement, the remaining Partners who are not in default shall have the right to seek and obtain damages from the defaulting Partner . . . .” Blackwell argues that language allows only the partners, and not the partnership, to sue Blackwell for damages and specific performance. However, the partnership agreement was signed in 1985, at a time when partnerships could not bring an action in their own name. See Haddock Flying Serv. v. Tisdale, 288 S.C. 62, 64, 339 S.E.2d 525, 526 (Ct. App. 1986) (“However, a partnership is not such a legal entity that it may maintain a suit in its name alone.”). Had the partnership agreement stated otherwise, any such authority would have been meaningless. The legislature remedied the situation in 1986 by adopting S.C. Ann. Code § 15-5-45 (2003) which states that “[a]ny partnership formed under the laws of this State . . . shall have the capacity . . . to sue and be sued in the courts and agencies of this State as a separate entity . . . .”
Moreover, while the partnership agreement did not authorize the partnership to sue a defaulting partner, neither did it forbid such an action. The partnership agreement is silent on the matter. In such a situation, we look to state law to determine whether the action is permissible. See Weeks v. McWilliams, 291 S.C. 287, 292, 353 S.E.2d 289, 292 (1987) (ruling that the dissolution of a partnership was permissible because the partnership agreement did not specifically forbid it). The state of South Carolina granted partnerships the power to sue on their own behalf in 1986. Therefore, RIM can bring this action.
II. The parties’ agreements
The trial court ruled that the 1989 agreement was inoperative and ordered Blackwell to contribute to RIM in order to repay Edens and Smith for their payment of the Blackwell note. That ruling was error.
In reaching its conclusion, the trial court relied partially on the South Carolina Uniform Partnership Act, S.C. Code Ann. § 33-41-510 (1994). The Act states in pertinent part: “The partnership must indemnify every partner in respect of payments made and personal liabilities reasonably incurred by him in the ordinary and proper conduct of its business or for the preservation of its business or property.” § 33-41-510(2). But that very section subordinates that general principle to the parties’ agreements, explaining that the “rights and duties of the partners in relation to the partnership shall be determined, subject to any agreement between them, by the following rules . . . .” § 33-41-510 (emphasis added). The question then becomes what agreements existed among Blackwell, the partners, and RIM and what effect those agreements had on the issue of contributing additional capital. The record indicates that the partners had a partnership agreement, an Amended and Restated Indemnification Agreement (the 1989 agreement), and the 1999 settlement.  The trial judge found that the parties’ 1999 settlement rescinded the 1989 agreement. There is no evidence to support that conclusion.
Any modification of a written contract must satisfy all the requirements of a contract, including a meeting of the minds. First Union Mortgage Corp. v. Thomas, 317 S.C. 63, 70, 451 S.E.2d 907, 912 (Ct. App. 1994). Here, there is no evidence of any discussion, action, or agreement to rescind the 1989 agreement by implication or otherwise.  There can be no “meeting of the minds” if the issue was not a part of the parties’ agreement. Just as importantly, the July 1999 Order specifically states that “[t]he Amended and Restated indemnification Agreement dated 1 February, 1989 was not addressed in the settlement agreement reached by the parties and therefore it is not part of the settlement.”
Moreover, there is no evidence that the 1989 agreement and the 1999 settlement materially contradict each other. Both documents provide that Blackwell would remain a partner and share in the partnership’s profits and debts, including the Blackwell note. And both documents placed restrictions on how the Blackwell note could be paid. The 1989 agreement stated: “Eden, Finley, and Smith shall not have the right to require contribution from Blackwell on account of any payment they may have to make on the Note. Any such payment(s) shall be deemed to be a capital contribution(s) to the Partnership by the party making the same.” The 1999 settlement, too, forbade RIM to borrow money to pay the Blackwell note without Blackwell’s prior permission. Although Blackwell may be required to contribute to the payment of the note, the documents, when read together, limit Blackwell’s contribution toward the Blackwell note to his share of the funds generated by RIM and only if RIM did not default on the note.
This conclusion is reinforced by RIM’s pleading in the prior action. Paragraphs 37 and 39 of RIM’s Amended Third Party Answer And Claims state that RIM relied on Blackwell’s representation that the “[s]o-called [Blackwell note] would be a ‘cash flow,’ ‘soft’ note and would be paid from distributions from operations and refinancing of the hotel.”  It is clear that the parties never agreed that Blackwell would make a capital call contribution to pay the Blackwell note.
III. Effect of prior rulings
Blackwell raises a res judicata argument, asserting that the trial court erred when it held that its November 2, 1999 Order did not bar RIM’s current action seeking contribution from Blackwell. We agree.
“A case that is dismissed ‘with prejudice’ indicates an adjudication on the merits and, pursuant to res judicata, prohibits subsequent litigation to the same extent as if the action had been tried to a final adjudication.” Nelson v. QHG of S.C., Inc., 354 S.C. 290, 311, 580 S.E.2d 171, 182 (Ct. App. 2003). “To establish res judicata, the defendant must prove the following three elements: (1) identity of the parties; (2) identity of the subject matter; and (3) adjudication of the issue in the former suit.” Plum Creek Dev. Co. v. City of Conway, 334 S.C. 30, 34, 512 S.E.2d 106, 109 (1999). Res judicata is an affirmative defense that must be pled at trial in order to be pursued on appeal. Wagner v. Wagner, 286 S.C. 489, 491, 335 S.E.2d 246, 247 (Ct. App. 1985). An affirmative defense is waived if not pled. Howard v. S. C. Dep’t of Highways, 343 S.C. 149, 152, 538 S.E.2d 291, 294 (Ct. App. 2000). Generally, claims or defenses not presented in the pleadings will not be considered on appeal. McNeely v. S.C. Farm Bureau Mut. Ins. Co., 259 S.C. 39, 41, 190 S.E.2d 499, 499 (1972).
On appeal, RIM insists that a res judicata defense is not available to Blackwell because Blackwell did not raise it in his answer. Blackwell counters that the res judicata issue is preserved because RIM did not object when Blackwell argued the issue before the trial court and because the trial court ruled on the matter in its appealed order. Generally, “res judicata must be pleaded to be established,” but an exception to the broad rule exists “where the matter ‘becomes an issue without objection based upon the lack of pleading.’” Baty v. Stanley, 291 S.C. 546, 548, 354 S.E.2d 571, 572 (Ct. App. 1987) (citing Beall v. Doe, 281 S.C. 363, 367, 315 S.E.2d 186, 188 (Ct. App. 1984)). Therefore, RIM waived any valid objection it might have otherwise had by not timely objecting to Blackwell’s res judicata argument.
We agree that the issue was preserved and we hold that the 1999 settlement does preclude the current claim. “Res judicata bars subsequent actions by the same parties when the claims arise out of the same transaction or occurrence that was the subject of a prior action between those parties.” Plum Creek Dev. Co., 334 S.C. at 34, 512 S.E.2d at 109. The doctrine bars not only the claims that were actually raised, but also those “issues which might have been raised in the former suit.” Id. (citation omitted) (emphasis added).
The 1999 settlement stipulated that “[a]ll of the pending litigation against John and Hazel Blackwell will be dismissed with prejudice.” And in an amended order, the trial court dismissed with prejudice “all causes of action and claims by and against” Blackwell that were “asserted” as well as “all claims made by RIM” in the Amended Fourth Party Complaint. At the time, RIM had numerous claims against Blackwell, including one for “Estoppel/Breach of Partnership Agreement.” RIM sought indemnification as a remedy. In its 2001 action against Blackwell, RIM again claimed “Breach of Partnership Agreement,” but attempted to add a claim for contribution. The question then is whether this claim is a new and separate one, as to be beyond the reach of the 1999 documents.
RIM asserts that the contribution claim is permissible because it had not accrued and was not yet “asserted” in 1999. Since we find that RIM did not plead a cause of action for contribution, its argument may well be moot. However, we choose to address it and hold that the claim is barred by res judicata. It is well settled that “[r]es judicata bars subsequent actions by the same parties when the claims arise out of the same transaction or occurrence that was the subject of a prior action between these parties.” Nelson, 354 S.C. at 304, 580 S.E.2d at 178 (emphasis added). The source was the same in RIM’s prior action as in the action sub judice: the payment of the Blackwell note. Therefore, RIM’s current action is barred.
RIM also contends that res judicata does not apply because the earlier action was one for indemnification, not contribution. But RIM is merely seeking a different remedy here. “A different remedy, however, does not alter the fact that the claims are identical.” Plum Creek Dev. Co., 334 S.C. at 35, 512 S.E.2d at 109 (citing 46 Am. Jur. 2d Judgments § 536 (1994) (“A claim for damages is a claim for relief rather than an assertion of a different cause of action for purposes of determining the applicability of res judicata.”)). “[F]or purposes of res judicata, ‘cause of action’ is not the form of action in which a claim is asserted but, rather the ‘cause for action, meaning the underlying facts combined with the law giving the party a right to a remedy of one form or another based thereon.’” Id. at 36, 512 S.E.2d at 110 (citing 50 C.J.S. Judgment § 749 (1997)).  As stated earlier, the genesis of this action and of the previous one is the collection of the Blackwell note. Additionally, the parties involved are the same. Therefore, res judicata is applicable and bars this action.
IV. RIM’s borrowing
Blackwell argues the trial court erred when it found that RIM did not borrow the funds to pay the Blackwell note in violation of the 1999 settlement. We agree. 
The 1999 settlement included a stipulation that RIM would not attempt to borrow money to pay the Blackwell note, “except with the prior written approval of John Blackwell.” Aware of that condition, RIM asked its accountant, Marty Ouzts, to treat the two million dollars from Edens and Smith as an “advance.” But an advance is nothing more than a loan. See Tuller v. Nantala Park Co., 276 S.C. 667, 281 S.E.2d 474 (1981) (treating advances as money given as part of a loan); Okatie River, L.L.C. v. Southeastern Site Prep, L.L.C., 353 S.C. 327, 336, 577 S.E.2d 468, 473 (Ct. App. 2003) (finding that a company was entitled to repayment even though the money it gave was identified as an advance). As Outzts himself admitted, “an advance is something that is anticipated to be repaid.” Smith, one of the partners, repeated as much during his testimony. He was asked: “In your terminology, does a loan and an advance mean two different things, or is it the same thing?” Smith responded: “I don’t know of any difference.” In this instance, RIM entered the money received from Smith and Edens as an advance, and that advance – used to pay the Blackwell note – entitled Smith and Edens to immediate repayment. Clearly, to the extent that RIM “paid” the debt, it borrowed the money from Smith and Edens. Under the 1999 settlement, RIM was not allowed to do so since Blackwell had not agreed to the loan in writing.  Therefore, RIM’s action for contribution is barred.
RIM argues that the payment was made directly to Blackwell by the partners as guarantors of the note. Thus, it was not a loan to RIM.  If this were true, then RIM would have had no need to record the money given to Blackwell in its books as an advance from the partners. RIM’s argument convinces the Court that the surviving guarantors of the Blackwell note were cognizant of the restrictions in the 1989 agreement and in the 1999 settlement and attempted to circumvent those restrictions. The only reasonable conclusion from looking at the evidence is that RIM borrowed the money to pay the Blackwell note in violation of the 1999 settlement.
The trial court’s finding that the partnership agreement authorized capital calls is unavailing to RIM. The 1989 agreement exempted Blackwell from contributing to the partners for any payment made on the Blackwell note. See supra. The 1989 agreement also required that such payment be considered a capital contribution. Since the partnership agreement prohibited the partners from withdrawing their capital contributions, any payment on the Blackwell note would be payable only upon the dissolution of the partnership. Therefore, RIM had no immediate debt to the partners, and Blackwell had no duty to make a contribution.
We find that (1) RIM had the authority to bring the current action; (2) the 1999 settlement did not rescind the 1989 agreement, and Blackwell had no duty to contribute under that agreement; (3) the 1999 litigation precludes the current action pursuant to res judicata; and (4) to the extent that RIM paid the Blackwell note, RIM borrowed the money, clearly violating the parties’ agreements. Having so found, we need not reach Blackwell’s remaining arguments. The trial judge’s ruling is
GOOLSBY and HUFF, JJ., concur.
 The Partnership Agreement prohibited the withdrawal of capital contributions.
 Jim Finley has died; RIM is now suing his estate.
 The reference in RIM’s complaint to a cause of action for contribution is a misnomer. RIM merely alleges that Blackwell breached the partnership agreement since that agreement provided for capital calls and Blackwell refused to contribute when requested. RIM’s complaint does not reflect any allegation that RIM had paid the partnership debt. An action for contribution cannot be maintained prior to the payment of a debt. First Gen. Serv. of Charleston, Inc. v. Miller, 314 S.C. 439, 443, 445 S.E.2d 446, 448 (1994) (affirming the dismissal of an action for contribution where the plaintiff had not made any payment since “the right to contribution does not arise prior to payment”); Andrade v. Johnson, 345 S.C. 216, 225, 546 S.E.2d 665, 670 (Ct. App. 2001) (defining contribution as “the ‘[r]ight of one who has discharged a common liability to recover of another also liable, the aliquot portion which he ought to pay or bear’”), rev’d on other grounds, Andrade v. Johnson, 356 S.C. 238, 588 S.E.2d 588 (2003); 18 Am. Jur. 2d Contribution § 19 (2004) (explaining that a party seeking contribution is entitled to recover “the amount he has paid in excess of his share … a ratable sum of the loss actually sustained”). Therefore, the right of contribution rises only after a party “has been compelled to pay what another should have paid.” 18 Am. Jur. 2d Contribution § 2 (2004). Here, since RIM does not allege in its complaint that it paid the Blackwell note, it is doubtful that RIM can sustain an action for contribution. Even if RIM’s cause of action for contribution was feasible, the standard of review would be the same since an action for contribution lies in equity. See Few v. Few, 239 S.C. 321, 334, 122 S.E.2d 829, 835 (1961) (noting that “the right to contribution is ordinarily enforced in equity”); Kafka v. Pope, 521 N.W.2d 174, 176 (Wis. Ct. App. 1994) (explaining that the contribution process “is based on principles of equity . . . ”).
 RIM alleges the lack of an adequate remedy at law.
 The partners contend that the parties reached a settlement on April 9, as per a letter from Blackwell to the partners. Blackwell disputed the settlement, but the trial judge found in his June 11 Order that the parties had reached a settlement “according to the terms of the March 31st letter.” Contrary to RIM’s assertion, however, the March 31 letter does not represent the complete settlement between the parties. In response to a motion to reconsider the June 11 Order, the trial court ruled in its July 1, 1999 Order that certain items not included in that letter are “the basis for the settlement.” Moreover, the trial court indicated that the April 9, 1999 letter mentioned at least one term not contained in the March 31 letter, which term is also a condition of the settlement. We therefore must glean the complete terms of the 1999 settlement from more than one document. The parties are appealing neither the June 11 nor the July 11 Orders.
 The parties had expressly invalidated “in its entirety” their 1985 Indemnification Agreement, replacing it with the 1989 agreement. Had they wished to invalidate the 1989 agreement, they certainly could have included similar language in the 1999 settlement.
 When the hotel was refinanced, RIM retained the excess proceeds and did not pay the Blackwell note.
 RIM could also have brought an action for exoneration whereby it could have sought payment from Blackwell even before satisfying the Blackwell note. See 38 Am. Jur. 2d Guaranty § 124 (1994).
 The Court understands that the debt was indeed paid. We maintain only that RIM never alleged in its complaint that it had paid the debt.
 In the order now on appeal, the trial court declared that Blackwell had given his “prior written approval” to a loan “by virtue of the settlement that was reached . . . and confirmed in writing” by the parties. Again, the record does not provide a scintilla of evidence for such a conclusion. Reaching a settlement is a far cry from agreeing that a debt can be repaid with a loan.
 We note that this argument supports the notion that RIM cannot bring a cause of action for contribution since RIM was not the party that paid the debt.