In a DBZ shooter I'm making. Yes I know a DBZ game I don't want to here it. I'm surprised myself to be finding me making a DBZ game. Luckily non Zeta Related. anyways I keep geting this error message after a minut or 2 of playing.
runtime error: Maximum recursion level reached (perhaps there is an infinite loop)
To avoid this safety check, set world.loop_checks=0.
proc name: shootcheck (/mob/proc/shootcheck)
usr: Codesterz (/mob)
src: Codesterz (/mob)
call stack:
That infinite loop is supposed to happen. I'm not quite sure where the error is but most likely here.
mob/proc/shootcheck()
sleep(10)
if(usr.shoot >= usr.maxshoot)
usr.shoot = usr.maxshoot
shootcheck()
else
usr.shoot += 1
shootcheck()
This is proc is called when you login and is supposed to be happening constantly. This reloads some ki.
ID:148418
Feb 24 2003, 1:34 pm
|
|
Feb 24 2003, 1:37 pm
|
|
Getting rid of the sleep() and instead putting spawn(10) src.shotcheck() should fix it. And its a proc, use src, not usr.
|
In response to OneFishDown
|
|
This is my damage system from Malver's War Demo. How would I make it add a kill for the killer and a death for the killed? No matter what I do it won't work.
mob/proc/Damage(var/mob/ch, var/dam) ch.hp -= dam ch << "You take [dam] damage!" if(ch.hp < 1) ch.deaths += 1 world << "[ch.name] has been killed!" ch.loc = locate(1,1,1) ch.hp = 100 return |
In response to Codesterz
|
|
Codesterz wrote:
This is my damage system from Malver's War Demo. How would I make it add a kill for the killer and a death for the killed? No matter what I do it won't work. I would've thought damage would be set up the other way, where src is the damagee and ch is the damager. But so far so good; you just have to increment src.kills. Lummox JR |
In response to Lummox JR
|
|
Still not working. I really need it to work otherwise there is no way to level up. Then you can't get the other attacks
|
In response to Codesterz
|
|
Are you using a bumping projectile to cause damage?
If so, you will have to give it an owner variable when it is created and then updage owner:kills Salarn |