Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I got some of it
#15
I change it but i got a problem.
Code:
' :::::::::::::::::::::
' :: Edit npc packet ::
' :::::::::::::::::::::
Sub HandleEditNpc(ByRef Parse() As String)
Dim n As Long

     n = CLng(Parse(1))
    
     ' Update the npc
     Npc(n).Name = Parse(2)
     Npc(n).AttackSay = Parse(3)
     Npc(n).Sprite = CInt(Parse(4))
     Npc(n).SpawnSecs = CLng(Parse(5))
     Npc(n).Behavior = CByte(Parse(6))
     Npc(n).Range = CByte(Parse(7))
     Npc(n).DropChance = CInt(Parse(8))
     Npc(n).DropItem = CByte(Parse(9))
     Npc(n).DropItemValue = CInt(Parse(10))
     Npc(n).Stat(Stats.Strength) = CByte(Parse(11))
     Npc(n).Stat(Stats.Defense) = CByte(Parse(12))
     Npc(n).Stat(Stats.SPEED) = CByte(Parse(13))
     Npc(n).Stat(Stats.Magic) = CByte(Parse(14))
     Npc(n).Quest = CByte(Parse(15))
     Npc(n).MaxHP = CByte(Parse(16))
     Npc(n).ExpGiven = CByte(Parse(17))
    
     ' Initialize the npc editor
     Call NpcEditorInit
End Sub

It highlights Npc(n).ExpGiven = CByte(Parse(17)) and says subscript out of range
ive been playing withg it for 10 mins and cant figure it out
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)