lol in the first moment I thought that the comments are german but with a lot of mistakes...^^
Your problem is that the second whileloop is only called if skill1 is null. Just put the content of the second whileloop into the first one or put the loop into an extra function which you call in front of the other loop.