30.04.2014, 02:38
I'm very tired so please bare with me.
If I understand correctly, I think "break;" causes your loop to stop completely. Either removing "break;" or changing the second "if" to "else if" may fix it.
If you want to break the loop regardless, I suggest placing the break; statement outside any "if" statement. (i.e. before the closing callback of the loop).
Sorry if I don't make alot of sense, would appreciate someone else either rephrasing my words or correcting them.
If I understand correctly, I think "break;" causes your loop to stop completely. Either removing "break;" or changing the second "if" to "else if" may fix it.
If you want to break the loop regardless, I suggest placing the break; statement outside any "if" statement. (i.e. before the closing callback of the loop).
Sorry if I don't make alot of sense, would appreciate someone else either rephrasing my words or correcting them.