Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SetHighMaxMap
#7
Not that I know if this works for sure, I don't have my VB installed to test it and I haven't touched coding in a long time >< but stealing Spodi's example for clearing players try this:


Code:
Public Sub SetHighMaxMap()
Dim FilePath As String
Dim f As Long, i As Long
Dim EmptyMap As Maprec

    For i = 1 To MAX_MAPS
        f = FreeFile
        FilePath = App.Path & "\Maps\Map" & i & ".dat"
        Open FilePath For Binary As #f
            Get #f, , HighMap(i)
            If HighMap(i)  EmptyMap Then
                HIGH_MAX_MAPS = i
            End If
        Close
    Next i
End Sub
I added
Code:
Dim EmptyMap As Maprec
to the top and changed
Code:
If HighMap(i).HighTile(0, 0).Ground  0 Then
to
Code:
If HighMap(i)  EmptyMap Then

Just an idea, don't know if it'll work =) Seems logical enough though =P
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)