Re: Error in act.wizard.c / *NEWBIE?* Help with whogroup command

From: R. Seth Trotman (sfd@ix.netcom.com)
Date: 07/10/96


Uh, yeah.  strcpy() takes 2 arguments.  the source and the destination
string.

Then use sprintf(buf, dest_string) to put it in the buffer.

Seth - ZombieMUD - zombie.iglou.mud 2150


----------
> From: Eduardo Gutierrez de Oliveira <eduo@sparc.ciateq.conacyt.mx>
> To: Niese-Petersen <Tenp@cris.com>
> Cc: Carlos Rodriguez <crodrigu@academ01.chs.itesm.mx>; CircleMUD Mailing
List <circle@pvv.ntnu.no>
> Subject: Re: Error in act.wizard.c / *NEWBIE?* Help with whogroup
command
> Date: Wednesday, July 10, 1996 7:31 PM
> 
> On Wed, 10 Jul 1996, Niese-Petersen wrote:
> 
> > 
> > Here is how I would do it:
> > 
> > ACMD(do_whogroup) {
> >    extern struct descriptor_data *descriptor_list;
> >    struct descriptor_data *d;
> >    struct follow_type *f, *next;
> 
> This seemed nice so I tried it out, and I get two errors with strcpy:
> 
> gcc -c -g -O -Wall -fno-strict-prototypes  act.informative.c
> act.informative.c: In function `do_whogroup':
> act.informative.c:1131: too many arguments to function `strcpy'
> act.informative.c:1137: too many arguments to function `strcpy'
> *** Error code 1
> 
> The lines are:
> 
> 1131:
>        strcpy(buf1, "%s is followed by:\n\r", GET_NAME(d->character));
> 1137:
>          strcpy(buf1, "%s%s", GET_NAME(f->follower), (!next ? "\n\r" :
", "));
> 
> I cannot find anything wrong with these, any ideas?
> 
> Both of them have next:
> 
>           strcat(buf, buf1);
> 
> Greets
> Mythago
> 
>
--------------------------------------------------------------------------
-
> Eduardo Gutierrez de Oliveira                 
eduo@sparc.ciateq.conacyt.mx
> Administrador de Internet                            Internet
Administrator
> Proveedor de Servicio Internet                    Internet Service
Provider
>                                 CIATEQ, A.C.
>  Centro de Investigacion y Asistencia Tecnica del Estado de Queretaro,
A.C.
>                      http://sparc.ciateq.conacyt.mx/
>
--------------------------------------------------------------------------
-
> 



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