|
|
Salut alors j'ai un probleme dans mon code le voici :
Private Sub TraiterLigne(ByVal L As String)
Dim i As Integer
Dim Morceau As String
Dim Longueur As Integer
Dim LongueurMorceau As Integer
Dim Compteur As Integer
Dim CRT As New CARTE
Compteur = 0
Do Until L = ""
Longueur = Len(L)
'MsgBox(Longueur)
i = 1
Morceau = ""
While Microsoft.VisualBasic.Right(Morceau, 1) <> "/"
'MsgBox(Microsoft.VisualBasic.Left(L, i))
Morceau = Microsoft.VisualBasic.Left(L, i)
'L = Microsoft.VisualBasic.Right(L, Longueur - i)
'MsgBox(Morceau)
'MsgBox(L)
i = i + 1
End While
Compteur = Compteur + 1
L = Microsoft.VisualBasic.Right(L, Longueur + 1 - i)
'MsgBox(L)
LongueurMorceau = Len(Morceau) - 1
Morceau = Microsoft.VisualBasic.Left(Morceau, LongueurMorceau)
'MsgBox(Morceau)
'MsgBox(Compteur)
'CRT.Code = Morceau
'MsgBox(CRT.Code)
'ListeCartes.AjoutCarte(CRT)
Select Case Compteur
Case 1
CRT.Code = Morceau
'MsgBox(CRT.Code)
Case 2
CRT.Nom = Morceau
'MsgBox(CRT.Nom)
Case 3
CRT.Serie = Morceau
'MsgBox(CRT.Serie)
Case 4
CRT.NumSerie = Morceau
'MsgBox(CRT.NumSerie)
Case 5
CRT.Attribut = Morceau
'MsgBox(CRT.Attribut)
Case 6
CRT.Type = Morceau
'MsgBox(CRT.Type)
Case 7
CRT.Niveau = Morceau
'MsgBox(CRT.Niveau)
Case 8
CRT.Attaque = Morceau
'MsgBox(CRT.Attaque)
Case 9
CRT.Defense = Morceau
'MsgBox(CRT.Defense)
Case 10
CRT.Icone = Morceau
'MsgBox(CRT.Icone)
Case 11
CRT.Effet = Morceau
'MsgBox(CRT.Effet)
Case 12
CRT.CodeOCG = Morceau
'MsgBox(CRT.CodeOCG)
End Select
Loop
MsgBox(CRT.Code & " " & CRT.Nom)
ListeCartes.AjouterCarte(CRT)
End Sub
Voici l'erreur qu'il me renvoi lors du débogage :
http://img372.imageshack.us/img372/9183/bug4rg.jpg
J'espère que vous pourrez m'aider,
@+
|