When, upon the trial of any proceeding under this chapter, it appears from the evidence that the defendant has been guilty of either a forcible entry or a forcible or unlawful detainer, and other than the offense charged in the complaint, the Judge must order that such complaint be forthwith amended to conform to such proofs; such amendment must be made without any imposition of terms. No continuance shall be permitted upon account of such amendment unless the defendant, by affidavit filed, shows to the satisfaction of the Court good cause therefor.