Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[FIXED] Big bug MS3.0.3
#10
In a blank mirage source MS3.0.3.

SERVER
I change :
Code:
Public Const MAX_NPCS = 255
to
Code:
Public Const MAX_NPCS = 500

I change :
Code:
Type MapRec
    Name As String * NAME_LENGTH
    Revision As Long
    Moral As Byte
    Up As Integer
    Down As Integer
    Left As Integer
    Right As Integer
    Music As Byte
    BootMap As Integer
    BootX As Byte
    BootY As Byte
    Shop As Byte
    Indoors As Byte
    Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec
    Npc(1 To MAX_MAP_NPCS) As Byte
End Type
to
Code:
Type MapRec
    Name As String * NAME_LENGTH
    Revision As Long
    Moral As Byte
    Up As Integer
    Down As Integer
    Left As Integer
    Right As Integer
    Music As Byte
    BootMap As Integer
    BootX As Byte
    BootY As Byte
    Shop As Byte
    Indoors As Byte
    Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec
    Npc(1 To MAX_MAP_NPCS) As Integer
End Type


CLIENT
I change :
Code:
Public Const MAX_NPCS = 255
to
Code:
Public Const MAX_NPCS = 500

I change :
Code:
Type MapRec
    Name As String * NAME_LENGTH
    Revision As Long
    Moral As Byte
    Up As Integer
    Down As Integer
    Left As Integer
    Right As Integer
    Music As Byte
    BootMap As Integer
    BootX As Byte
    BootY As Byte
    Shop As Byte
    Indoors As Byte
    Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec
    Npc(1 To MAX_MAP_NPCS) As Byte
End Type
to
Code:
Type MapRec
    Name As String * NAME_LENGTH
    Revision As Long
    Moral As Byte
    Up As Integer
    Down As Integer
    Left As Integer
    Right As Integer
    Music As Byte
    BootMap As Integer
    BootX As Byte
    BootY As Byte
    Shop As Byte
    Indoors As Byte
    Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec
    Npc(1 To MAX_MAP_NPCS) As Integer
End Type

I launch the server. (it's OK)
I create a account and a character. (acces 5)
I login, I am in the game.
/mapeditor and I clic property.
I choice the 256 NPC, I clic OK.
I save the map and :

Runtime error 6 overflow :
Quote: ' ::::::::::::::::::::::
' :: Npc spawn packet ::
' ::::::::::::::::::::::
If LCase(Parse(0)) = "spawnnpc" Then
n = Val(Parse(1))

MapNpc(n).Num = Val(Parse(2)) 'runtime error 6 : overflow
MapNpc(n).x = Val(Parse(3))
MapNpc(n).y = Val(Parse(4))
MapNpc(n).Dir = Val(Parse(5))

' Client use only
MapNpc(n).XOffset = 0
MapNpc(n).YOffset = 0
MapNpc(n).Moving = 0
Exit Sub
End If

Why ?

help me please.
(sorry for my bad english)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)