> if (!(fl = fopen(PLAYER_FILE, "r+"))) { > fread(&player, sizeof(struct char_file_u), 1, fl); This is fine when you have a small pfile, but when it gets large, you lag the whole mud everytime you use it. What I did was expand the player index struct and added all the things I want to be able to query. It takes up a bit of memory but its quite handy. Also, you have to update the table whenever a player saves, and/or just before you use the info. Ron +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST