ID:145041
 
Code:
proc
PvP(mob/M, mob/H)
if(..())
if(H.monstermove)
var/monsterspawn/S = new H.monstermove
if(S)
var/battlefield/A
for(var/battlefield/b in world)
if(b.fieldtype==S.fieldtype)
if(!b.inuse)
A = b
break
if(A)
H.xx = H.x
H.yy = H.y
H.zz = H.z

M.xx = M.x
M.yy = M.y
M.zz = M.z

H.loc = A.loc
H.frozen = 1

M.frozen = 1
M.loc = A.loc

H.client.edge_limit = "[H.x-7],[H.y-3] to [H.x+7],[H.y+3]"
M.client.edge_limit = "[M.x-7],[M.y-3] to [M.x+7],[M.y+3]"

H.x -= 2
M.x += 2

H.dir = EAST // set their directions
M.dir = WEST

H.inbattle = 1
M.inbattle = 1

H << sound('music/dq6-battle.mid',1,channel=1, volume=75)
M << sound('music/dq6-battle.mid',1,channel=1, volume=75)
Head()

H.stb += 4
M.stb += 4

new /battle_sorters (A.loc, H, M)
new /battle_sorters (A.loc, M, H)

Child_Girl
icon_state = "Girl"
head = /obj/Heads/HGirl/
human = 1
monster = null

Level = 1
Class = "Child"
HP = 28
MaxHP = 28
MP = 0
MaxMP = 0

Power = 11
Agility = 3
Speed = 6
Wisdom = 5
Style = 5

Attack = 11
Defense = 3

GoldReward = null
ExpReward = null
DblClick()
if(usr in oview(src, 1))
PvP(usr,src)


Problem description:

I wanted to intiate a PvP battle when someone was double clicked by another but i keep getting the run time error..

runtime error: Cannot execute null.PvP().
proc name: PvP (/proc/PvP)
source file: battle.dm,527
usr: Newen (/mob/players/Child_Boy)
src: null
call stack:
PvP(Newen (/mob/players/Child_Boy), Golm (/mob/players/Child_Boy))
Golm (/mob/players/Child_Boy): DblClick(the grass2 (16,21,1) (/turf/ground/grass/grass2))
Unm... please show us where line 527 is in the above code >.>

- GhostAnime
In response to GhostAnime
oops, sorry

line 527 is

        if(..())
In response to Newen
Hmm, try taking that line out and de-dent everyting elow it (wonder what'll happen than...)

- GhostAnime
In response to GhostAnime
lol, it works now, with a few minor bugs on my part (not errors) thanks for helping me with my stupidity :D
In response to Newen
No problem but it really isn't stupidity, it's more of clarelessness... I have seen stupidity ... amusing

- GhostAnime