DT2000 - It seems as though you are taking the code that wuf wrote, and trying to manipulate it into some other body of code.
The code wuf debugged, is what you said was your complete code.
Therefore, delete what you presented to wuf, and replace it 100 % with wuf's debugged version.
The code wuf debugged, is what you said was your complete code.
Therefore, delete what you presented to wuf, and replace it 100 % with wuf's debugged version.