If the plaintiff shall give the occupying claimant notice, in writing, of his claim, and of the nature thereof, such notice shall bar the occupying claimant, and all persons claiming from or through him, of compensation for improvements made after such notice.
§ 524.240, RSMo