I dont know why 'Doub' isn't updating

by Fried Noodles   Last Updated October 10, 2019 02:26 AM

I'm working on a program to count every time the dice roll a double but my variable i'm trying to add to the listbox isn't updating and I don't know why...

Here's the code:

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'declare vars
        Dim teal, red, doub As Integer
        Dim rand As New Random
        teal = rand.Next(6)
        red = rand.Next(6)
#Region "Clear"
Irrelevant stuff
#End Region
        'green dice
            irrelevant if statement
        'red dice
            irrelevant if statement
        **If red = teal Then
            doub = doub + 1
            output.Items.Add("Doubles: " & doub)
        End If**
    End Sub
End Class

In the if statements about the dice part there is nothing to influence the 'doub' variable so thats why i put "irrelevant if statement" also because stackoverflow said the post was mostly code

Tags : vbscript

Related Questions

Updated March 28, 2015 10:09 AM

Updated April 30, 2015 21:11 PM

Updated July 22, 2015 17:11 PM

Updated May 14, 2015 02:11 AM