How stupid of me! I didn't declare the procedure properly. I added the parameter where it was declared. This fixed the problem.
I'm new to pointers so can you help me? Do I need to free any pointers? Thanks for the replies.
EDIT: FCounter: PtrInt; Is this an integer or a pointer?