ID:263045
 
Code:
mob/verb/Rest()
usr<<"You begin to rest."
usr.Stamina=usr.MaxC
sleep(30)
usr.lockmovement = 1
Move()
if(usr.lockmovement = 0)
.=..()
else
return 0
usr<<"You are done resting."


Problem description:
i get the error proc definition not allowed in another proc whats wrong?

You're trying to redefine Move() inside verb/Rest(). Honestly, do you people think at all?
You're trying to redefine Move() within Rest(). You can't do that. Also you're abusing usr, and you're setting lockmovement after the sleep() instead of before.

I might recommend, however, not restoring stamina immediately. Instead, try regenerating slowly and breaking the cycle if the player moves. Something like this:
mob
nomoveid = 0
lastmove = 0

verb/Rest()
var/id=++nomoveid
while(stamina < maxC && nomoveid==id)
// regenerate 10% of loss (or 1 point minimum) every 3 seconds
sleep(30)
stamina = min(round(0.9*stamina+0.1*maxC,1),stamina+1)

Move()
nomoveid = (nomoveid+1) & 0xFFFF
. = ..()

This will silently break any cycle you have going that requires you not to move, but still allows you to move if you need to.

Lummox JR