How should my while/else be indented?

2 posts were split to a new topic: Is there something wrong with this code?