[NEWBIE] special proc

From: Joe Frohne (frohne@POST.ITS.MCW.EDU)
Date: 07/17/97


Hi All,
I have a special room proc im working on.  It is simple enough, you ask a
mob a question and it responds with some gibberish.  The problem is, the
code only works once.  If you ask the question again, it dosent seem to
return anything.  I figure im not clearing or setting some variable.  Im
not sure what tho.  Any hint/help is apprecitated.

SPECIAL(kroom)
{

  static char one[256]="", two[256]="";
  static char answer[256]="Hi!  My name is Rangelaon Beanlinger.\r\n";

  if (!CMD_IS("ask"))
    return 0;

  half_chop(argument, one, two);

  if (strcmp(one, "kender"))
    /* do_ask */
    return 0;


  if (!strcmp(two, "hi")){

    strcat(answer, "How did you get here?\r\n");
    strcat(answer,
      "I have been wandering in this wonderful place for days!\r\n");
    strcat(answer,
      "There are so many things to see here.  I just love it,\r\n");
    strcat(answer,
       "but if you will excuse me I must get back to my map.\r\n\r\n");
    strcat(answer,
       "Randelaon smiles and returns to his drawings.\r\n\r\n");

    send_to_char(answer, ch);

  }
  return 1;
}


     +------------------------------------------------------------+
     | 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/08/00 PST