Re: Spoken Language Code

From: Mark Garringer (zizazat@HOTMAIL.COM)
Date: 10/14/02


>I have made a few minor changes to the spoken language snippet credited to
>Frollo (mudaholic@aol.com). Props to anyone else who helped with this code
>but is not credited.

Found a silly little bug which needs correcting:

>ACMD(do_languages)
>{
>  int i, found = FALSE;
>
>  one_argument(argument, arg);
>  if (!*arg)
>    list_languages(ch);
>  else {
>    for (i = MIN_LANGUAGES; i < MAX_SKILLS; i++) {
>      if (is_abbrev(arg, languages[i-MIN_LANGUAGES]) && GET_SKILL(ch, i) >
>60) {
>        SPEAKING(ch) = i;
>        sprintf(buf, "You now speak %s.\r\n", languages[i-MIN_LANGUAGES]);
>        send_to_char(buf, ch);
>        found = TRUE;
>        break;
-     }
+     } else {
        send_to_char(ch, "You do not know of any such language!\r\n");
      }
>    }
>    if (!found)
>      list_languages(ch);
>  }
>}

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT