I am glad that "it" is working but for future reference please post complete sketches and not snippets of them so that those helping do not have to guess what the problem might be
I am glad that "it" is working but for future reference please post complete sketches and not snippets of them so that those helping do not have to guess what the problem might be