Hey i'm new here and i need help with a slot machine game that i want to make. So far i have three labels that should be generating random numbers but they won't appear. I also have a label which will total the players money. I have taken so ideas from other peoples examples but it now wont work. I am also confused on what to do with the caption and command things.
Here is my code so far
Private Sub Form_Load()
Randomize()
intwin = 100
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Application.Exit()
End Sub
Private Sub NewGameToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles NewGameToolStripMenuItem.Click
Application.Restart()
End Sub
Private intwin As Integer
Private intnum1 As Integer
Private intnum2 As Integer
Private intnum3 As Integer
Private Sub cmdpull_Click()
intwin = intwin - 1
intnum1 = Int(3 * Rnd + 1)
intnum2 = Int(3 * Rnd + 1)
intnum3 = Int(3 * Rnd + 1)
Lbl1stNumber.Caption = intnum1
Lbl2ndNumber.Caption = intnum2
Lbl3rdNumber.Caption = intnum3
If intnum1 = 1 And intnum2 = 1 And intnum3 = 1 Then
MessageBox.Show("You won $1") 'Player wins $1 for getting all numbers one
intwin = intwin + 3
ElseIf intnum1 = 2 And intnum2 = 2 And intnum3 = 2 Then
MessageBox.Show("You won $5") 'Player wins $5 for getting all matching twos
intwin = intwin + 6
ElseIf intnum1 = 3 And intnum2 = 3 And intnum3 = 3 Then
MessageBox.Show("You won $10") 'Player wins $10 for getting all matching threes
intwin = intwin + 10
Else
MessageBox.Show("Try again") 'Happens if you didn't win anything
End If
LblTotal.Caption = intwin
End Sub
End Class