TicTacToe help :/
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
Im working on this tic tac toe program
if label 1 2 and 3 is X or O then i want msgbox to pop out.
i tried:
:?: :?:
if label 1 2 and 3 is X or O then i want msgbox to pop out.
i tried:
Code: Select all
but that didn't work..If Label1.Text And Label2.Text = Label3.Text = True Then
MsgBox("X WINS")
End If
:?: :?:
Code: Select all
+rep if helps please If Label1.Text And Label2.Text And Label3.Text = "X" Then
MsgBox("Player X Wins!!")
ElseIf Label1.Text And Label2.Text And Label3.Text = "O" Then
MsgBox("Player O Wins")
End If

Instead of LOL use this -
LSIBMHBIWFETALOL
Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
LSIBMHBIWFETALOL
Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
The above code is trying to convert the text to boolean values, which will cause exceptions. You should do it this way:
Code: Select all
If Label1.Text = "X" And Label2.Text = "X" And Label3.Text = "X" Then
MsgBox("X WINS")
End If
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023