Dim x As Integer = 0
For i = 0 To MyMonster.Length - 1
If Not MyMonster(i).ID = ID Then
MyMonster(x).ID = MyMonster(i).ID
MyMonster(x).X = MyMonster(i).X
MyMonster(x).Y = MyMonster(i).Y
x = x + 1
End If
Next
ReDim MyMonster(x)
why after i read the MyMonster structure all become 0 ?
is this work?
Solved...Use ReDim Reserve MyMonster(x)
For i = 0 To MyMonster.Length - 1
If Not MyMonster(i).ID = ID Then
MyMonster(x).ID = MyMonster(i).ID
MyMonster(x).X = MyMonster(i).X
MyMonster(x).Y = MyMonster(i).Y
x = x + 1
End If
Next
ReDim MyMonster(x)
why after i read the MyMonster structure all become 0 ?
is this work?
Solved...Use ReDim Reserve MyMonster(x)
Last edited: