"Can't work" isn't very specific. What do you do to run this? What happens? What do you expect to happen instead?
If it's an error that happens while the program is running, would it be possible for you to narrow down the code to show only the part relevant to the problem?