Re: Titles

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 10/20/97


On Mon, 20 Oct 1997, Co-Sysop wrote:

>>There's also a "set_title(ch, NULL);" in (I think) do_start() in
>>class.c.  If you remove all the set_title()'s though, you might as
>>well also remove the auto-titles from the level list and remove the
>>support code from set_title() (this also means changing do_level()
>>and any other functions that look for the titles).
>
>That specific title is used when you first create your character.  i don't
>recommend removing it because then when you create a character it's title
>doesn't get set.  I was giving a way to make it so that someone's title
[...]
>just making sure titles don't change when a person levels).  I'm not sure
>EXACTLY what kind of an effect removing this line would have (since the
>title wouldn't have been set yet).  This isn't directed at you alone (you
>being the poster of the message I am replying to) it is more of a warning
>for all the newbies out there who want titles to stay the same but aren't
>quite sure what needs to be done.  But as I have said before, its your mud.

If you wanted to get rid of set_title() altogether, you could just put this
line in do_start() instead of the current way:

GET_TITLE(ch) = "a newbie";

You don't need to malloc(), although note that trying to free their title
after this will cause bad things.  For sanity's sake, you should do:

GET_TITLE(ch) = str_dup("a newbie");

A test for GET_TITLE(ch) != NULL would pass, but free()'ing the memory
would still cause a crash in the first example.  This way, when there is a
valid pointer, it is a valid free().

Or you could just say: GET_TITLE(ch) = NULL; and hope the code copes.

(As to what I believe Daniel was referring to in removing all reference to
those charts, I did that also in my MUD.)

 --
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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