Please edit your post, select all code and click the <CODE/> button. This will apply code tags which make your codee easier to read, easier to copy and the forum software will display it correctly. See How to get the best out of this forum.
In future please post complete sketches that can be tested without us having to guess what the missing parts are. If a sketch is too big (your opinion) you can write a minimal sketch that exhibits the undesired behaviour.
Please post complete error messages if any and describe expected behaviour and actual behaviour.