break void function when the condition is met

Alaxwora:
But for me the problem is not in the code formatting

You do not seem to have noticed Reply #7

And formatting code so it is easy to read can often help YOU to find errors. It also makes it a great deal easier for other people to help you.

...R