If the judgment appealed from be reversed in part and affirmed as to the residue, the amount of costs allowed to either party shall be such sum as the appellate court may award. If the judgment be reversed for an error of fact in the proceedings not affecting the merits, costs shall be in the discretion of the court.
S.C. Code § 18-7-270