Hello . ., Having th'e mud search through pfiles for th'e information you want will probably be very inefficient. If you want to get th'e info from th'e pfiles, you'd be better off writing a script in another language, such as perl, as Michael suggested.
If you really want to have th'e mud keep track of th'e information, th'e best way to do it would be set up some global variables to keep track of th'e information. Instead of scanning through all th'e pfiles everytime you want to print th'e HTML, just print out th'e variables. Then you just have to worry about keeping th'e variables correct. Every time you get a new character, or someone deletes, or you change somebody's race, you'll need to update th'e race counts. Th'e same thing goes for other things you want to keep track of. In order to get th'e initial values when th'e mud starts, you'll want to save them to a file, and have your mud read th'e file in when it starts. Th'e first time you can just initialize th'e file manually, using another tool such as grep to scan through th'e pfiles to get th'e correct initial counts. Another way to do this (and th'e way I would probably do it) would be to use a database, such as MySQL to store th'e data in. This would allow you to do all sorts of fancy stuff rather easy. Dennis On Sun, 26 Jan 2003, . . wrote: > Ok, I'm writing a function that creates a file in html. I wan't it to have > all kinds of current stats. What my problem is, is that I can't find a way > for the MUD to figure out certain things. For example, I wan't to print out > how many people are of XXX race or class or clan. Perhaps search all the > pfiles and return a # that I can print to the file? Other ideas welcome. > > _________________________________________________________________ > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > >

