Step 1: You're handed the exact line of the problem, go there. (439:22, Type mismatch)
TP[ID] := acd[11];
Seems fairly straight forward.
Step 2: Check what type TP is an array of, and what acd is an array of.
acd (array of string) was fairly straight forward, it was just a couple of lines above the error (although not local to the procedure, but that's clearly just a mistake)
TP (array of boolean) was slightly harder, and required the use of a super secret developer tool, which you can usually access via ctrl + f.
So that was about two minutes of work. Repeat this process for the next error after you fix that as well...
Edit: And the one after that. And the one after that. And the one after that.
Edit: 8 of the same error? How about you try things you're not sure of once and see if it works before you put it everywhere. After those errors, apparently you're trying to call a function that doesn't exist four times. After that it compiles, but clearly doesn't work...