mob/skill
verb
ShootPistol()
src.Health_Bar()
src.Mind_Bar()
src.Action_Bar()
src.Exp_Bar()
if(usr.doing == 0)
usr.doing = 1
var/obj/Projectile/Redlazerbeam/A=new(usr.loc)
A.icon='redlazerbeam.dmi'
A.Owner=usr
A.ForceName="Redlazerbeam"
walk(A,usr.dir)
sleep(10)
usr.doing = 0
obj
projectile
Redlazerbeam
density=1
Move()
..()
src.lifespan-=1
if(lifespan<=0)
del src
Bump(A)
if(ismob(A))
var/damage = ((src.maxmind/2) + (src.gundamage))
var/mob/M=A
if(src.Owner==M)
src.x=M.x
src.y=M.y
else
if(M.ForceProtect)
src.dir=turn(src,180)
src.lifespan=15
walk(src,src.dir)
else
view(src)<<output("[M] has been hit by a [src.ForceName] for [damage]!","combat")
flick("Shoot",usr)
M.health -= damage
M.health = round(M.health)
M.death(M)
del src
else
del src
..()
Problem description:
runtime error: Cannot read 0.exp
proc name: GiveReward (/mob/proc/GiveReward)
source file: inventory.dm,4
usr: 0
src: the sandcat (/mob/Enemies/sandcat)
call stack:
the sandcat (/mob/Enemies/sandcat): GiveReward(the sandcat (/mob/Enemies/sandcat))
the sandcat (/mob/Enemies/sandcat): death(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Bump(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Move(Dirt (15,229,1) (/turf/dantooine/Dirt), 1)
runtime error: Cannot read 0.exp
proc name: levelup (/mob/proc/levelup)
source file: procedures.dm,3
usr: 0
src: the sandcat (/mob/Enemies/sandcat)
call stack:
the sandcat (/mob/Enemies/sandcat): levelup(the sandcat (/mob/Enemies/sandcat))
the sandcat (/mob/Enemies/sandcat): death(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Bump(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Move(Dirt (15,229,1) (/turf/dantooine/Dirt), 1)
runtime error: Cannot read 0.exp
proc name: GiveReward (/mob/proc/GiveReward)
source file: inventory.dm,4
usr: 0
src: the sandcat (/mob/Enemies/sandcat)
call stack:
the sandcat (/mob/Enemies/sandcat): GiveReward(the sandcat (/mob/Enemies/sandcat))
the sandcat (/mob/Enemies/sandcat): death(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Bump(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Move(Dirt (15,229,1) (/turf/dantooine/Dirt), 1)
runtime error: Cannot read 0.exp
proc name: levelup (/mob/proc/levelup)
source file: procedures.dm,3
usr: 0
src: the sandcat (/mob/Enemies/sandcat)
call stack:
the sandcat (/mob/Enemies/sandcat): levelup(the sandcat (/mob/Enemies/sandcat))
the sandcat (/mob/Enemies/sandcat): death(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Bump(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Move(Dirt (15,229,1) (/turf/dantooine/Dirt), 1)
runtime error: Cannot read 0.exp
proc name: GiveReward (/mob/proc/GiveReward)
source file: inventory.dm,4
usr: 0
src: the sandcat (/mob/Enemies/sandcat)
call stack:
the sandcat (/mob/Enemies/sandcat): GiveReward(the sandcat (/mob/Enemies/sandcat))
the sandcat (/mob/Enemies/sandcat): death(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Bump(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Move(Dirt (15,229,1) (/turf/dantooine/Dirt), 1)
runtime error: Cannot read 0.exp
proc name: levelup (/mob/proc/levelup)
source file: procedures.dm,3
usr: 0
src: the sandcat (/mob/Enemies/sandcat)
call stack:
the sandcat (/mob/Enemies/sandcat): levelup(the sandcat (/mob/Enemies/sandcat))
the sandcat (/mob/Enemies/sandcat): death(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Bump(the sandcat (/mob/Enemies/sandcat))
Redlazerbeam (/obj/Projectile/Redlazerbeam): Move(Dirt (15,229,1) (/turf/dantooine/Dirt), 1)
This happends when i kill a mob with my projectile, that is fired from my shootpistol verb.
Im pretty sure it have somthing to do with Levelup() and GiveReward(), but i dont know how i can make it work properly. So if one of u bright minds on this forum could help me. That would be great :)