In my dice game, whenever I press a roll button, I get this error in my function to check if there is a three of a dice: "Object reference is not set to an instance of an object"
Here is my code:
I looked all over Google but couldn't find a solution.
Here is my code:
Private Function checkingthreeof1() As Boolean
For i = 0 To 5
If faces(i) >= 3 Then 'This is where the error is
threeof = i + 1
checkingthreeof2(True, 0)
End If
Next
Return True Or False
End Function
I looked all over Google but couldn't find a solution.