Re: char_player_data problem, again...

From: Emil Nilimaa (
Date: 09/24/99

>From: Peter Ajamian <pajamian@CHEAPSAM.COM>
>Reply-To: Circle Discussion List <>
>Subject: Re: char_player_data problem, again...
>Date: Thu, 23 Sep 1999 22:27:12 -0700
>Zeavon wrote:
> > I could be wrong, but I bet you have something like:
> > ch->titlea = "with a big nose"
> > OR
> > ch->titlea = argument;
>Actually, these lines will not cause a seg fault, the first line will
>have the compiler create a string constant and set the ch->titlea pointer
>point to it, the second line will simply point ch->titlea to the same
>string as
>argument (this may cause a problem later, though, if argument is a local
>variable and a read attempt on ch->title is attempted from another
>I'm guessing that you probably meant to give an example like the
>strcpy(ch->titlea, "with a big nose");
>strcpy(ch->titlea, argument);
>If ch->titlea has not first been set to point to a properly allocated area
>memory this will almost always cause some type of problem and usually end
>causing a seg. fault.
This is how i have dont it now:

as the characer is created they chose some stuff like
now i did like this:

d->character->player.descb = "with brown eyes";

and added char *descb to char_player_data
this do not crash the game when i use the olc.

did same thing for *descc,

but when trying to add another one, called desca
the game crashes when using olc.

same thing if i add the afk snippet,
which adds a message to char_player_data
the game crashed when using olc.

how can descb descc work?
if the other stuff i add to char_player_data dont..

the thing desca  was exactly the same as descb and descc,
so it seems odd this fails.


Get Your Private, Free Email at

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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