Thanks guys... appreciated the help... I'm sure I'll need more later. For color logins... I just made a send_to_desc function. I copied send_to_char and changed all ch->desc to d, and it works fine, this way sounds cool too:)
Josh ----- Original Message ----- From: "Ferric Coyote" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 15, 2002 11:07 PM Subject: RE: descriptor bug? > Heh,was gone all weekend, but what He said; that's the way Melmoth > handles it (it's part of the 'color prompt without asking if you want > ANSI color) code. > > Later, > > -Ward > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bobby > > Hicks > > Sent: Monday, April 15, 2002 5:13 PM > > To: RML > > Subject: RE: descriptor bug? > > > > <snip> > > --- Josh <[EMAIL PROTECTED]> wrote: > > > Ok i was playing around with my first descriptor loop(i wanted to > see if > > an > > > id matched any character playing...) and i kept (might be keep, > dunno > > havent > > > had real time to test it) getting segmentation faults. > > > > > > Not having gdb (don't ask... its broke) i made little functions to > test > > > things, and one i did tested to see if the d->character was NULL, i > was > > > surprised when i had a couple NULL characters on my descriptor list. > > Did > > i > > > > > > A) delete something i shouldnt have somewhere? > > > B) do something wrong? > > > C) thats normal to have a couple d->characters on your > descriptor_list > > NULL > > > D) waste your time with a stupid newbie question? > > > > > > > This is typical. It occurs when someone has connected to the mud, but > has > > not > > yet been assigned a character.. Like looking at the login prompt, or > > whatever. > > As long as you make the appropriate tests you won't have any problems. > > <snip> > > > > One thing I did with mine, which I'm only using it for my greeting > screen, > > is I created a CHAR_DATA *ch = new_char(); in my init_descriptor(you > can > > put > > yours somewhere else as long as you pass it), then before I use ch, I > have > > ch->desc = dnew; And voila, ch is declared. This is only one > suggestion, > > tho. It works for me, no bugs or anything. Also, before exiting > > init_descriptor(), I have free_char( ch ); so I free up the memory > before > > the player is reassigned a new char_data. Just a thought. > > > > > > Rheede > > > > > > PS, if someone has a better way of doin this, or has suggestions, > > comments, > > questions, send me an e-mail please. Thanks. > > > > > > -- > > ROM mailing list > > [email protected] > > http://www.rom.org/cgi-bin/mailman/listinfo/rom > >

