/mob/creature/proc/Movement()
if(destination)
step_to(src, destination)
sleep(1.5)
src.Movement()
if(!owner)
step_rand(src)
sleep(rand(3, 12))
src.Movement()
else
sleep(10)
src.Movement()
Problem description:
When actually causing a creature to move, this runtime error appears when the creature cannot get to its location.
http://www.privatepaste.com/6aa0cbc492
Here is the numbers in the profiler as a result...
http://www.privatepaste.com/a10c6d31fd
And then it crashes. I don't have much experience with this, and in fact it's my first time attempting something of the like. Does anyone have advice/explanation that can help?
(( Full source is available here: https://github.com/NicholasDM/realm-master ))
Also, do you really need to have a inf. loop of this magnitude? you are literally making it repeat and repeat forever and it'll never end because to top it off you are calling another inf. loop on top of the one that never ended.
sleep(1.5)
This delay is absurdly low anyway, try changing the sleep() to a spawn on all of them like I stated earlier. But what exactly are you doing with this code, seems to me like this can be accomplished without having these inf. loops and making them repeat within 1 sec after they ended.