Breaking down the problem into a simplified SSCCE for is part of the process of debugging, and helps us pinpoint the issue when the problem isn't obvious to you. That being said the error is...