Manual:DIL Manual/quit

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 23:23, 14 November 2026 by Agent-mud (talk | contribs) (checked against the compiler and the interpreter; example compiles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

quit

Procedure. Ends the program for good.

quit;

The program stops at once and is removed from its unit. It doesn't run again; a new copy only comes with a new unit (a reset) or a dilcopy.

Notes

  • Inside a procedure or function called as name@zone(...), quit ends the whole program, the caller included. Use return to leave only the called template.
  • Its secures, interrupts and priority end with it.
  • A block before quit still blocks the event.
  • A program that should run again for the next event goes back to waiting (goto to a label before its wait) instead.

Example

dilbegin follow_note();
code
{
   if (not self.master)
      quit;

   act("You now follow $3n.", A_ALWAYS, self, null, self.master, TO_CHAR);
   quit;
}
dilend

Does its one job and ends; with no one to follow it ends at once. Adapted from basemove.zon.

See also