Maximum recursion level reached (perhaps there is an infinite loop)
To avoid this safety check, set world.loop_checks=0.
proc name: nextturn (/mob/proc/nextturn)
usr: Issu (/mob/cleric)
src: the curer (/monster/curer)
call stack:
the curer (/monster/curer): nextturn()
The above line like, 50 times
=/
nextturn()
var
mob/T
t=1
for(var/mob/q in src.turnorder)
if(q.client&&q.leader)
T=src.turnorder[t]
break
t++
if(!T)
src.nextturn()
T.currentturn++
T.currentturn=listcheck(T.turnorder,T.currentturn)
var/mob/M=T.turnorder[T.currentturn]
if(!M)
src.endbattle()
return
if(M.dead)
src.nextturn()
M.turn=1
M.taketurn()
It always loops on the person who attacks. =/ I don't get why...(I know it's inefficient, so, go me. :D)
[edit]It has something to do with the mob/T thing, I know it. ;o The problem didn't occur until I added parties.
I'm not sure I see the logic here. You're looking for a mob in src.turnorder that has a client and leader is non-zero. If no such mob if found you recurse by calling the same function over. However none of the previous conditions could have possibly changed so it'll only recurse again. And again. And again. Of course even if the recursion eventually terminated(though in your case there is no possible way) it would continue to execute the next line and you would be errors because T would be null. You should probably add in comments explaining what you are trying to do so people would know how to help you as right now all I see is a bunch of source that makes absolutly no logical sense.