ID:167281
 
    proc
move()
if(src.stamina > 1)
src.stamina --
else
if(src.able == 1)
src << "<b><big>\yellow You have gained running exp!"
src.runexp += 5
able = 0
world.loop_checks=0.
else
return
proc
checkexp()
if(src.stamina == maxstamina)
src.able += 1
checkexp()
world.loop_checks=0.

proc
levelrun()
if(src.runexp == maxrunexp)
src << "<b><big>\yellow You have gained a running level!"
src.levelrun()
world.loop_checks=0.



proc
moveup()
sleep(staminaboost)
if(src.stamina < maxstamina)
src.stamina ++
src.moveup()
world.loop_checks=0.
else
src.moveup()
world.loop_checks=0.
// A loop happens here now.
// Calling some procedures whyen the player moves

Move()
if(src.stamina == 0) return
else
..()
src.move()



Stat()
statpanel("stamina",src.stamina)
statpanel("running exp",src.runexp)


I'm wondering how to fix the infinite loops problem... Also, as soon as i gain 5 runing exp I can no longer gain exp... Yes, I have all the vars defined. Can anyone tell me how to fix this (or show me)?
world/loop_checks = 0


Your putting them in the wrong spot.
In response to Crzylme
Thanks... But i can still only gain 5 running exp and no more... Help?
In response to Speedro
You're having a proc run itself, which will definitely cause an infinite loop problem. Turning off loop_checks is only a temporary fix to what could become a problem. Have moveup() spawn the proc instead of just calling it.

In your moveup() proc, do this:
src.moveup()//replace these

spawn() src.moveup()//with these


Aside from that, I'll need to take more of a look at the code to see if there's anymore problems.

=Edit=
I don't see checkexp() being ran anywhere, and that appears to be the only way for the 'able' var to be set back to something other than 0 so the player can gain more running exp.