Re: What should Spec Procs return?

From: ;P (siv@CYBERENET.NET)
Date: 03/31/98


> What should spec procs return - FALSE or TRUE.

it depends..if you want to continue going through the command list after
running the spec proc, then it should be FALSE..if you want it to just run
the spec proc..then it should be TRUE..for example:

SPEC(poo)
{

  /* we only want to trigger when the command is "poo" */

  if (!CMD_IS("poo"))
    return FALSE;       /* wasn't a command or command wasn't 'poo'     */
                        /* so continue through the command list         */

  do special stuff      /* command was 'poo'                            */
  return TRUE;          /* so don't go through the command list (which  */
                        /* would result in seeing 'you can't do that    */
                        /* here'                                        */
}

siv


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST