hope someone can help me out.I'm surprised no one put a code. So, here's an example code:
i try to create a hangman-game in qb64.
i want the program to randomly pick a word from a word list and use it as a string$
i have a txt-file that contains 1000 words (one word per line).
ive used ”open for input” for highscore tables and such, but i really have no idea where to begin with this...
any ideas?
Rotebr0
I'm surprised no one put a code. So, here's an example code:Code: QB64: [Select]Hope you understood xD!
My bad xD, I forgot to write DO WHILE NOT EOF(1) xD. I didn't check it as I was using iPad at that moment lol.
I'm surprised no one put a code. So, here's an example code:Code: QB64: [Select]Hope you understood xD!
Don't be surprised no one posted code, because it does look like a homework assignment and rotebrO hasn't denied it (yet).
I don't think your code example will work for him, did it work for you? Looks like you are missing a DO to increase x and to EXIT when x hits the random number.
Also I think Hangman would want to be played more than once, so best to load the words into an array, you could even check off words you've done already so not replayed.