Run-time error '9' subscript out of range ;/

when my character is dying  this error is jumping out. when I am pressing ok in the window with client, window is shutting
he won’t give sie this way to play ;/

Im using eclipse STABLE

Post your OnDeath.ess (Server/Scripts/Modules/OnDeath.ess, or Modules might have been functions, don’t remember). I’ll give you a fixed version you can take.

It’s Scripts\Events\OnDeath.ess.

RTE 9 is when you’re trying to set something that doesn’t exist. There is an error many were getting because there was a variable not set in the default OnDeath. There are three lines with the word “target” in them towards the bottom. Change those to “index” and it should work, assuming it’s the same problem. If not, do as Soul said, and post your OnDeath file.

What really needs to happen is that Eclipse Stable needs to switch to Godlord’s Main 3 so we can stop posting the same fix every time.

’ Module: OnDeath.ess ’
’ Author: Stephan J.R. van Schaik
’ Date: August 30th, 2009. ’
’ Version: 1.0.0 ’

’ Function: OnDeath ’
’ Brief: executes when a player dies outside of an arena. ’
’ Parameters: ’
’ Index: the index number of the player who died. ’
Sub OnDeath(Index)
If GetMapBootMap(Index) > 0 Then
Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
Map = CInt(GetVar(“Classes\Class” & GetPlayerClass(Index) & “.ini”, “CLASS”, “Map”))
X = CInt(GetVar(“Classes\Class” & GetPlayerClass(Index) & “.ini”, “CLASS”, “x”))
Y = CInt(GetVar(“Classes\Class” & GetPlayerClass(Index) & “.ini”, “CLASS”, “y”))

Call PlayerWarp(Index, Map, X, Y)
End If

Call SetPlayerHP(Index, GetPlayerMaxHP(Index))
Call SetPlayerMP(Index, GetPlayerMaxMP(Index))
Call SetPlayerSP(Index, GetPlayerMaxSP(Index))
Call SendPlayerData(Index)
End Sub/

Log in to reply