Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Summoning diffrent pets with items V2.0


RyokuHasu
 Share

Recommended Posts

  • 2 months later...
  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

Hm, not sure if it is from this or something else.

Added these mobs all  from you and lightning
http://www.touchofdeathforums.com/smf/index.php/topic,69521.0.html
http://www.touchofdeathforums.com/smf2/index.php/topic,72517.new.html#new
http://www.touchofdeathforums.com/smf2/index.php/topic,78655.0.html
I keep getting error on sub petdisband in modgamelogic server side.
    PetMapCache(mapNum).Pet(Player(index).Pet.CNum) = 0

"subscript out of range"

```
'Clear the npc from the map
Sub PetDisband(ByVal index As Long, ByVal mapNum As Long)
    Dim i As Long
    Dim j As Long

    If TempPlayer(index).TempPetSlot < 1 Then Exit Sub

    'Cache the Pets for players logging on [Remove Number from array]
    'THIS IS KINDA SLOW (EVEN WITHOUT TESTING, LOL), MAY HAVE TO CONVERT TO LINKED LIST FOR SPEED
    PetMapCache(mapNum).Pet(Player(index).Pet.CNum) = 0

    Call ClearSingleMapNpc(TempPlayer(index).TempPetSlot, mapNum)
    Map(GetPlayerMap(index)).NPC(TempPlayer(index).TempPetSlot) = 0
    TempPlayer(index).TempPetSlot = 0
    're-warp the players on the map
    For i = 1 To Player_HighIndex
        If IsPlaying(i) Then
            If GetPlayerMap(i) = GetPlayerMap(index) Then
                Call PlayerWarp(i, GetPlayerMap(i), GetPlayerX(i), GetPlayerY(i))
                SendPlayerData index
            End If
        End If
    Next
End Sub

```
This is the last mod added. It worked before this mod. I think I messed something up, but I am not sure where.

Commenting out
```
PetMapCache(mapNum).Pet(Player(index).Pet.CNum) = 0
```
Solves the crashing issue. What exactly does this do, and do I need it?
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...