View Single Post
Old 11-11-2003, 08:40 PM   #8
Shanks
New Member
 
Join Date: Aug 2003
Location: Brisbane, Australia
Posts: 2
Shanks is on a distinguished road
On Ancient Anguish one doesn't have to worry quite so much about infinite loops, as the mud doesn't usually crash as a result. Ancient Anguish is based on Amylaar LPMud 3.2.1@141.

Consider the following object:

[code] #pragma strict_types
inherit "obj/treasure";

void create()
{
;;create();
set_short("a looper");
set_long("This is an object that performs an infinite loop with the loop comm
nd.");
set_name("looper");
}

void init()
{
;;init();

add_action("do_loop", "loop");
}

int do_loop(string what)
{
// INFINITE LOOP;
while (1)
;
}[/quote]

What happens when you invoke the loop command?

[code] > loop
Too long evaluation. Execution aborted.
program; w/shanks/looper.c, object; w/shanks/looper#69319 line 21[/quote]

-Shanks
Shanks is offline   Reply With Quote