Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mysql errors
#4
Hi again. I appreciated the fast response before.

I found that I had declared RS like you did, but it fails in this block of code:

Code:
For I = 1 To MAX_MAPS
    Call SetStatus("Loading Map " & I & "/" & MAX_MAPS)
    With Map(I)
        .FKey = CLng(RS("FKey"))
        .Name = Trim(CStr(RS("Name")))
        .Revision = CLng(RS("Revision"))
        .Moral = CByte(RS("Moral"))
        .Up = CInt(RS("Up"))
        .Down = CInt(RS("Down"))
        .Left = CInt(RS("mLeft"))
        .Right = CInt(RS("mRight"))
        .Music = CByte(RS("Music"))
        .BootMap = CInt(RS("BootMap"))
        .BootX = CByte(RS("BootX"))
        .BootY = CByte(RS("BootY"))
        .Shop = CByte(RS("Shop"))
        .Indoors = CByte(RS("Indoors"))
        'Load Tiles
        Tiles = Split(Trim(CStr(RS("Tiles"))), "|")
        Q = 0
        For X = 0 To MAX_MAPX
            For Y = 0 To MAX_MAPY
                TileSet() = Split(Tiles(Q), "-")
                .Tile(X, Y).Ground = CInt(TileSet(0))
                .Tile(X, Y).Mask = CInt(TileSet(1))
                .Tile(X, Y).Anim = CInt(TileSet(2))
                .Tile(X, Y).Fringe = CInt(TileSet(3))
                .Tile(X, Y).Type = CInt(TileSet(4))
                .Tile(X, Y).Data1 = CInt(TileSet(5))
                .Tile(X, Y).Data2 = CInt(TileSet(6))
                .Tile(X, Y).Data3 = CInt(TileSet(7))
                Q = Q + 1
            Next Y
        Next X
        
        'Load NPCs
        NPCs = Split(Trim(CStr(RS.Fields("NPCS"))), "-")
        For Q = LBound(NPCs) To UBound(NPCs)
            .Npc(Q + 1) = CByte(NPCs(Q))
        Next Q
        
    End With
    DoEvents
    If I  MAX_MAPS Then
        RS.MoveNext
    End If
Next I

On the line .FKey = CLng(RS("FKey"))

I am not sure what variable you were suggesting to set it equal to...

Any further help would be much appreciated again.

Thanks,
swya
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)