in reply to Getting errors

See Problem in my coding, which has answers to this problem