Thanx for the help PaulS.
Dont see how the rest of my code will change anything all variables there are ints as stated before. What we are problem solving here has nothing to do with the rest of the code. But since you always insist on seeing all the code. Tell me how to attach my code which has multi tabs (25 to be exact) and is 51,480 bytes long and I will do so.