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

When someone is killed i get an error…


viciousdead
 Share

Recommended Posts

@Draken:

> can you explain more
>
> example
>
> when a npc kills you?
> when a Player kills you?
> when you die from a script?
> Did you mess with ondeath sub?
>
> Or post a screen shot

Happens when an NPC or player kills anyone(excluding other npc's).
Doesn't matter if you die by a script or not.
Didn't mess with OnDeath Sub.
Using Stable.

Screenshot:
![](http://i216.photobucket.com/albums/cc141/silento0o0/untitled-7.jpg)
Link to comment
Share on other sites

yea thats a script error, your main is messed up.

I dont use stable, simply because its not stable LOL

First check to make sure scripting is on

server/data.ini
scripting=1

if so then i dont know, like i said I dont use stable i use 2.7 since its the best IMO, had to many issues with 2.8 and stable …
Link to comment
Share on other sites

Sub OnDeath(Index)
If GetMapBootMap(Index) > 0 Then
Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
Else
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(Target, GetPlayerMaxHP(Target))
Call SetPlayerMP(Target, GetPlayerMaxMP(Target))
Call SetPlayerSP(Target, GetPlayerMaxSP(Target))
Call SendPlayerData(Target)
End Sub

Whats wrong with this script..
Link to comment
Share on other sites

@viciousdead:

> Sub OnDeath(Index)
> If GetMapBootMap(Index) > 0 Then
> Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
> Else
> 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(Target, GetPlayerMaxHP(Target))
> Call SetPlayerMP(Target, GetPlayerMaxMP(Target))
> Call SetPlayerSP(Target, GetPlayerMaxSP(Target))
> Call SendPlayerData(Target)
> End Sub
>
> Whats wrong with this script..

```
Sub OnDeath(Index)
If GetMapBootMap(Index) > 0 Then
Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
Else
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

```
Try that?
Link to comment
Share on other sites

replace that with

```
Sub OnDeath(Index)
If GetMapBootMap(Index) > 0 Then
Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
Else
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

```

ERRRG you posted before i did
Link to comment
Share on other sites

@Draken:

> replace that with
>
> ```
> Sub OnDeath(Index)
> If GetMapBootMap(Index) > 0 Then
> Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index))
> Else
> 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
>
> ```
>
> ERRRG you posted before i did

Thank you!
Link to comment
Share on other sites

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...