Qbasicnews.com

Full Version: Help with Hangman
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everybody. I've written a neat hangman game for my next programming project. I have a list of stored words, and the game randomly picks one (and the user then has to guess it). The problem is with words that have a space between them (for ex: The Simpsons, with a space between "The" and "Simpsons").

Whenever the game gets to a word like that, and the user fills out all the letters in the word, the game doesn't stop like it's supposed to. Instead, it keeps going (since every other letter would be wrong, all you can do is type wrong letters until you lose).

Does anyone know how to help me, so my game CAN read spaces between words?
Maybe the way you've coded it requires the player to guess the space too. Smile Is it possible to paste the code here? It would be easier to find a solution that way... Smile

-shiftLynx
http://www.qbasic.com has a version of hangman available for download there, look at that and see if it holds the answer to all your quaestions (or just don't put phrases, just single words).