Macro code for mating two faces

Hi everyone, I am planning to automate the mating between two parts using the faces. I wrote down the code already but there seems to be some issue, as seen in screenshot below. Do help me out on this. I have attached the parts needed to mate as well as the macro code. Much appreciated

SolidworksApi/macros