ID:178870
Mar 24 2002, 11:43 am
|
|
I just finished coding several procs for random monster encounters. The code compiles and works fine (even in game), but the program crashes during about one out of every three battles. I can't imagine that BYOND puts that much strain on a 1GHz processor with 256MHz of RAM, but maybe I'm wrong. Each of the monsters (usually five or so) has a random movement/seek-and-destroy proc, but I've handled much more than five at a time before. Has anyone else encountered similar problems, and if so, what can I do about it?
|
In response to Spuzzum
|
|
Spuzzum wrote:
Are you running the same proc from within a proc? I have one proc that does something like this: mob/proc/DoThis() [code] spawn(some_time) DoThis() I have world.loop_checks on, and while I did get warnings about endless loops last night, I have taken care of the problems. The code itself seems to work fine, but the program dies anyway. |
In response to Gakumerasara
|
|
Make sure some_time is always >= 1. It has changed recently so if the time you put in it will round to 0 there is no delay at all. Before it acted as if it were a one.
|
In response to English
|
|
I think I've figured out where the problem is . . . the program works fine when I don't use these two lines of code; seems kind of strange
for(var/mob/N in M.party) walk(N,0) |
In response to Gakumerasara
|
|
That is odd...
That should just stop the walking of every mob in M.party right? Well, at least it's working now. |
Are you running the same proc from within a proc?
Eg.
mob/proc/DoThis()
DoThis()
DoThis()
That'll throw you into "infinite recursion", which can crash Dream Seeker if you have world.loop_checks off.