Edit: Okay Did that and it fixed my problem thank you very much.
But am running through some more problems along the way, most in which i fixed on my own but one is troublign me.
This is for the hangman game from the darkbasic book.
guess as string
usedletters as integer
letterguess as integer
input "Guess a letter or press qq to quit: ", guess
letterguess = 1
while guess<> "qq" and letterguess <=11
rem for words that are 5 letters
if li = 5
if guess = itemletters(1)
text 115,380, guess
usedletters = usedletters + 1
endif
if guess = itemletters(2)
text 170,380, guess
usedletters = usedletters + 1
endif
if guess = itemletters(3)
text 215,380, guess
usedletters = usedletters + 1
endif
if guess = itemletters(4)
text 265,380, guess
usedletters = usedletters + 1
endif
if guess = itemletters(5)
text 305, 380, guess
usedletters = usedletters + 1
endif
endif
i have that repeated for li = 5 , li = 4 and li = 3
with that I have no problems. But my trouble is when all the guessed letters are correct and = gitem$ it needs to display "You win" 30 times randomly.
How do i create a variable that will put all correct guesses into one single variable where i can create an if statement for it to show you win?
sorry if this is not clear, best i could think of.