proc
Kill(mob/M in oview(1))
if(istype(M,/mob/monsters))
view(6) << "[src] slices [M] with his sword!"
del(M)
Kill()
else
..()
Kill()
New()
Kill()
And for some reason it doesnt kill the monster in oview 1...Thanks in advance for helping!
-Crio
ID:176456
![]() Jan 12 2003, 9:06 am
|
|
My code is :
proc And for some reason it doesnt kill the monster in oview 1...Thanks in advance for helping! -Crio |
New Guard created, looking for mobs in oview(usr,1).
None found. Calling Kill() again, waiting for return value. New Guard created, looking for mobs in oview(usr,1). None found. Calling Kill() again, waiting for return value. New Guard created, looking for mobs in oview(usr,1). None found. Calling Kill() again, waiting for return value. New Guard created, looking for mobs in oview(usr,1). None found. Calling Kill() again, waiting for return value. New Guard created, looking for mobs in oview(usr,1). None found. Calling Kill() again, waiting for return value. ... Maximum recursion level reached (ie, too many procs are waiting for another proc to stop). ... You need to spawn() in new procs, so that the original proc acn return. |
Oh and if i just put spawn() i get ATON of lag i can barely move...but if i put spawn(1) i get no lag...its weird
|
That's because you're calling Kill(), but Kill() takes an argument, which is a mob in oview(usr,1). Instead:
mob/Guard/proc/Kill() |
runtime error: Maximum recursion level reached (perhaps there is an infinite loop)
To avoid this safety check, set world.loop_checks=0.
proc name: Kill (/mob/guards/Recruit_Guard/proc/Kill)
usr: Recruit Guard (/mob/guards/Recruit_Guard)
src: Recruit Guard (/mob/guards/Recruit_Guard)
call stack:
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
...
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): Kill(null)
Recruit Guard (/mob/guards/Recruit_Guard): New(the grass (38,29,1) (/turf/grass))
When i login...