Bonjour à tous, je vien ici car j'ai un probleme que je n'arrive pas à résoudre depuis des heures et je ne vois pas d'ou mon probleme peut venir.
Voila un bout de code :
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim recu As String
Winsock1.GetData recu
If recu = "TOUCHE" Then
PV.Caption = PV.Caption - 1
End If
If recu = "connect" Then
Moi.Visible = True
WindowsMediaPlayer1.URL = ""
Command9.Enabled = True
MsgBox "Vous est connecté au serveur ! Votre adversaire commence la partie", vbInformation, "Info"
Form1.WindowsMediaPlayer2.URL = "sounds/position.wav"
End If
If recu = "GO!" Then
Frame2.Enabled = True
MsgBox "A vous de jouer !", vbInformation, "Jeu"
PA.Caption = PA.Caption + 10
End If
If recu = "Vue" Then
Lui.Visible = True
End If
If recu = "H" Then
Lui.Top = Lui.Top - 120
Lui_Zone.Top = Lui_Zone.Top - 120
End If
If recu = "B" Then
Lui.Top = Lui.Top + 120
Lui_Zone.Top = Lui_Zone.Top + 120
End If
If recu = "G" Then
Lui.Left = Lui.Left - 120
Lui_Zone.Left = Lui_Zone.Left - 120
End If
If recu = "D" Then
Lui.Left = Lui.Left + 120
Lui_Zone.Left = Lui_Zone.Left + 120
End If
If recu = "TIRE" Then
WindowsMediaPlayer2.URL = "sounds/pompe.wav"
If Lui.Top = Moi.Top And Lui.Left = Moi.Left Then
MsgBox "Vous avez perdu ! Votre adversaire vous à tiré dessus !", vbInformation, "Game Over !"
Frame2.Enabled = False
Else
WindowsMediaPlayer2.URL = "sounds/pompe.wav"
End If
End If
If recu = "Gagne" Then
MsgBox "Vous avez gagné les PV de votre adversaire sont à 0", vbInformation, "BRAVO !"
Frame2.Enabled = False
End If
Voila alors mon probleme est que certaine donnée ne sont pas executé notament les données Gagne, TOUCHE, et TIRE
alors que c'est sur et certain que j'envois ces données ! Mais il ne doivent pas arriver puisque la condition ne s'effectue pas.
J'ai donc recrée un winsock pour metre ces conditions là c'est pareil mon projet ne veut plus accépter de nouvelles données envoyer via winsock...
La je rame car je ne vois vrément pas pourquoi.