Section 47. If a plaintiff fails to procure an endorser according to the order of the court, his action shall be dismissed and the defendant or other party shall recover his costs.