Payment from variable amount

Thank you for your help however I must be doing something completely wrong. So I decided to paste one of your examples in and even this comes up with errors!