The solution may have been trivial - maybe even a single character fix, but this smells like you posted a wall of code and wanted someone to go through it with a comb for you. You likely got downvoted because you didn't provide a minimal verifiable example and instead posted way more code than was necessary to produce the bug.
If you post anything more than a few lines of code, you are probably providing TMI and need to spend more effort distilling down the problem. 9 out of 10 times, you'll find the root of the problem yourself during this distillation process, especially if the problem is trivial.
Then again, this is wild speculation, but I see this a lot when I am helping newbies.