>Well, got the primary bugs ironed out of the namechange function but
>there's one minor problem. It changes it fine and saves the pfile, but
>doesn't update the plr_index. I have tried calls to build_player_index and
>save_player_index and neither of them work. Copied over and still can't log
>in as the changed name.
Of course it won't change the player_index, it isn't reloading the
player_index! If you use ASCII pfiles, that would mean loading up the
plr_index again, and for non-ASCII, that means re-loading the
player-file. Neither are very attractive. What you need to do is find
out the ID num, search for it on the player_index, modify that entry to
take into account the new name, THEN save_player_index.
I know this because I added in a name changing routine a while back. Two
things to remember:
#1. make sure for ASCII pfiles that all caps are stripped out of the file
name, but NOT the name saved in the file (that way you can have a name
like StormeRider work properly, that was my first error)
#2. You will need to check for duplicate names, that way you don't end up
with 2 players having the same name. You might also want to run it
through the standard valid_name stuff, to avoid cuss words, banned names,
etc.
+------------------------------------------------------------+
| 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/15/00 PST