I can only assume that you put the indentation level of the if statements so that they were inside the loop. They should be outside of that while loop, like I had in my above code.
jephthah commented: building an army, one comrade at a time +14
shadwickman 159 Posting Pro in Training
Lardmeister commented: nice code examples +5
Nyaato commented: Thanks for helping! +1
Your_mum commented: helpful +1
shadwickman 159 Posting Pro in Training
sneekula commented: thanks for taking the tough ones +8
William Hemsworth commented: *nods* i'll stop. +12
Nick Evan commented: Nice project. +19
rasizzle commented: excellent advice +1
jephthah commented: quality head trips. +11
vegaseat commented: thanks for helping out +12
max.yevs commented: really helpful, thanks a lot +1
crumpet commented: thanks! put me on the right track straight away +1
vegaseat commented: thanks for spending your time on this! +11
sneekula commented: I like your style +6
lllllIllIlllI commented: Great post, helped, worked, brilliant +1