Hi, Have you allocated any memory for the char *tmp?? Later... ...Chuck On Wed, 14 Aug 1996 goamkows@kirk.geog.scarolina.edu wrote: > i've added an elemental to the character file > ch->player_specials->saved.prefix > where *prefix is of type char. > > i want to prepend the prefix to the characters name when someone does > a who, so in do_who, i put in: > > char *tmp; > > then later on put in > tmp = strcat((wch->player_specials->saved.prefix), (GET_NAME(wch))); > > and replaced the GET_NAME in the sprintf that displays the name with tmp. > > it compiles without warning or error, but when i go to do a who, it > crashes the mud. > > gdb is giving the value of blah->saved.prefix as what i want it to be, > and presumably GET_NAME(wch) will turn up the appropriate name string, > so i have no idea what i am doing wrong :( > +-----------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | > +-----------------------------------------------------------+ > +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST