With respect to this question, Need help with wire connections and code, I feel sorry for the OP, as their code's indentation seems to get worse at each edit iteration.
There are obvious code errors in the sketch (one of which I pointed out in my answer). However, it's impossible to follow the code now as a lot of indentation has been removed, and I gave up trying.
I thought about fixing the indentation in the question, for the OP, but I stopped myself. However, I've seen that Majenko, on occasion, has submitted an answer (i.e. here), with the code correctly indented, rather than fixing indentation of the code in the question, and without actually correcting the code errors, but pointing them out instead, for the OP to fix.
Is that what I should do in this case (or rather, would that be an acceptable answer)? Or should I fix the indentation in the question itself?
I really only want to just fix the indentation and have it posted somewhere - hopefully after that the error will be a lot more obvious to point out.