<b>Code:</b>
<dm>
lizard_javelin
icon = 'base.dmi'
icon_state = "lizard javelin"
hp = 100
def = 0
var/t = 0
New()
spawn for()
for(var/mob/enemy/M in oview(7))
if(M)
var/obj/javelin/J = new
J.loc=src.loc
spawn for()
step_towards(J,M)
sleep(1)
step_towards(J,M)
sleep(1)
step_towards(J,M)
if(!M)
del J
break
if(M.loc==J.loc)
del J
M.hp -= 20
sleep(2)
if(!M)
return
sleep(40)
Problem description:
well whenever j hits M I get this error.
Sun Mar 23 10:58:40 2008
World opened on network port 5774.
Welcome BYOND! (4.0 Beta Version 412.977)
Stopped server.
World opened on network port 5774.
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1650
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (14,37,1) (/turf))
runtime error: Cannot read null.hp
proc name: New (/mob/priest/New)
source file: Protection.dm,1670
usr: the mpriest (/mob/priest/mpriest)
src: the mpriest (/mob/priest/mpriest)
call stack:
the mpriest (/mob/priest/mpriest): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.hp
proc name: New (/mob/priest/New)
source file: Protection.dm,1670
usr: the mpriest (/mob/priest/mpriest)
src: the mpriest (/mob/priest/mpriest)
call stack:
the mpriest (/mob/priest/mpriest): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.hp
proc name: New (/mob/priest/New)
source file: Protection.dm,1670
usr: the mpriest (/mob/priest/mpriest)
src: the mpriest (/mob/priest/mpriest)
call stack:
the mpriest (/mob/priest/mpriest): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.hp
proc name: New (/mob/priest/New)
source file: Protection.dm,1670
usr: the mpriest (/mob/priest/mpriest)
src: the mpriest (/mob/priest/mpriest)
call stack:
the mpriest (/mob/priest/mpriest): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/great_trident/New)
source file: Protection.dm,1715
usr: the mgreat trident (/mob/great_trident/mgreat_trident)
src: the mgreat trident (/mob/great_trident/mgreat_trident)
call stack:
the mgreat trident (/mob/great_trident/mgreat_trident): New(the grass (25,34,1) (/turf/grass))
Rebooted server.
Stopped server.
World opened on network port 5774.
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
usr: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
src: the mlizard javelin (/mob/lizard_javelin/mlizard_javelin)
call stack:
the mlizard javelin (/mob/lizard_javelin/mlizard_javelin): New(the turf (25,37,1) (/turf))
runtime error: Cannot read null.loc
proc name: New (/mob/lizard_javelin/New)
source file: Protection.dm,1649
It would be very helpful if you could find what is wrong.
with "mob"? You probably do but you didnt show it in the coding. Not sure if i helped lol I think that might be it cuz it says cannot read null hp, def etc