Re: [CODE][NEWBIE]The set name command for the last time

From: Daniel Koepke (
Date: 02/15/99

Julian Buckley wrote:

> My code looks like the following, and I also have the
> "can-log-in-as-old-name" thing, but after I reboot it fixes it :)  If
> anyone knows of the function that updates the binary playerfile so it's
> taken the new name, it'd be appreciated.

You have to update the player index.  The character's name is loaded
there along with a little bit of information so that Circle doesn't
have to load the entire record to get the info or, worse, when
searching if a character exists in the database: all the records
until the character is found.  Of course, it has to load every
record in the database on startup to create the index, but that's
only once compared to doing it every time you need to.  So, just
lookup the player by their old name (or maybe their ID, I think it's
in there and it eliminates a string compare) in the index, then
change what the index has.

It's "fixed" on reboot because the player index is created upon the
start of the game from the binary files.


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

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