i have simple loop:
For Each Pla As Player In Game.Players
Dim JustForTest As String
JustForTest = If(Pla.Name, Continue For)
Console.WriteLine(JustForTest)
Next
If the player's name is nothing, it should skip to the next item(or player) . but i got this error in "Continue For":
"BC30201 Expression expected."
Of course I can use like that:
For Each Pla As Player In Game.Players
If Pla.Name = nothing then
Continue For
end if
Console.WriteLine(Pla.Name)
Next
But I'm just curious what I was doing wrong , or is it a bug in VB ?
Aucun commentaire:
Enregistrer un commentaire