KiS
03-10-2002, 11:44 AM
HI!
I have a sub that I want to load a map into my game.....
This one:
Sub LoadMap()
Dim NewMapX As String
Dim NewMapY As String
Open "tile.txt" For Input As #1
Line Input #1, NewMapX
Line Input #1, NewMapY
ReDim Map(0 To NewMapX, 0 To NewMapY)
For i = 0 To UBound(Map, 2)
For j = 0 To UBound(Map, 1)
Map(j, i) = 1
Next j
Next i
Close #1
End Sub
And I have a call to it from Form_Load, But when I use this sub my screen gets black and I have to use ctrl-alt-del to come out of the game..... What have I done wrong?
I have a sub that I want to load a map into my game.....
This one:
Sub LoadMap()
Dim NewMapX As String
Dim NewMapY As String
Open "tile.txt" For Input As #1
Line Input #1, NewMapX
Line Input #1, NewMapY
ReDim Map(0 To NewMapX, 0 To NewMapY)
For i = 0 To UBound(Map, 2)
For j = 0 To UBound(Map, 1)
Map(j, i) = 1
Next j
Next i
Close #1
End Sub
And I have a call to it from Form_Load, But when I use this sub my screen gets black and I have to use ctrl-alt-del to come out of the game..... What have I done wrong?