Re: ACMD(do_desc)

From: Kras Kresh (kras_kresh@hotmail.com)
Date: 05/12/02


>From: Joe Mann <LightKnight@aol.com>
>Subject: [CIRCLE] ACMD(do_desc)
>Date: Sun, 12 May 2002 11:14:08 -0400
>
>Hey, I am trying to write a piece of code that will allow players to change
>their description in game using a command like:
>desc You see a tall person with dark hair.
>Here's what I have:
>
>ACMD(do_desc)
>{
>   skip_spaces(&argument);
>   if (!*argument) {
>     if (!ch->player.description)
>       send_to_char("You have no description!\r\n", ch);
>     else {
>       sprintf(buf, "Your current description is:\r\n%s",
>ch->player.description);
>       send_to_char(buf, ch);
>       }
>     }
>   else {

+      ch->player.description = strdup(argument);
->     ch->player.description = argument;

>     sprintf(buf, "Your description has been changed to:\r\n%s",
>ch->player.description);
>     send_to_char(buf, ch);

+     save_char(ch, NOWHERE);

>     }
>}

Follow the changes I just added. I don't remember if save_char() uses one or
two arguments, so compile and see if it gives you an error.

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

--
   +---------------------------------------------------------------+
   | 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