Code troubleshooting and code implementation questions are not in Programmers' site scope. Although there is an option to migrate such questions to Stack Overflow, the vast majority of them are not of sufficient quality to migrate there. Thus ensues a long-winded explanation of how we don't accept troubleshooting or implementation questions, but your question is not of sufficient quality to be migrated to Stack Overflow, yada yada.
The close reason ought to be simple enough:
Question about writing specific code (i.e. troubleshooting and implementation) are off-topic on Programmers. You might be able to get help on Stack Overflow, but read their Help Center first.