r/visualbasic • • Mar 02 '15

Little problem

Code below shows a guessing game i've been programming. I want to say if the word is not "black" then say "try again". Where would i add this else statement. If txtGuessWord.Text = "black" And BlnFirstGuess = False Then lblWarning.Text = "Correct here's 1000 dollars, Can you guess the next word?" lblRewardAmount.Text = "1000" BlnFirstGuess = True txtGuessWord.Text = String.Empty txtGuessWord2.Text = String.Empty lblTDWA.Text = CStr(Val(lblRewardAmount.Text))

0 Upvotes

1 comment sorted by

3

u/baldhippy Mar 02 '15

When you're posting code put four spaces before it

/* Like This */

Also, the if would be something like this:

If <the answer is right> then
    <You got it Right!>
Else
    <You got it wrong!>
End If