continue doesn't break out of a loop, it just ends the current iteration and immediately begins the next one. Anyway, it should be obvious that that statement will never be executed.
Your commented-out lines would, for the same reasons, never be executed.
And your return(0) statement is after the end of your loop.
To exit your loop, you could:
1) Use break in a place where it would actually be executed
2) Set loop = false in a place where it would actually be executed
3) Add a return statement to your loop, in a place where it would be executed
EDIT: Also, you would do yourself a huge favour if you adopted a consistent, sensible indentation style.
I tried using loop = false, break, and continue under the else statement, I was just showing all three while not actually executing all 3. If I don't put it in a statement it won't loop. Else should mean if anything else is typed end the loop, but instead it just scrolls.
I tried using loop = false, break, and continue under the else statement
And as I've already said:
Anyway, it should be obvious that that statement will never be executed.
Your commented-out lines would, for the same reasons, never be executed.
Take a careful, considered look at the logic of your if ... else if ... else block, and I'm sure you'll figure out why the final else block will never actually be executed.