Re: [CODE] Ascii pfiles and autowiz

From: Mike Stilson (
Date: 06/21/01

On Wed, Jun 20, 2001 at 07:09:26PM -0400, Dave Willard came up with this idea:
> and only have 2 problems. The first is with autowiz in the
> util directory. Has anyone altered this to use the plr_index
> file that is created with ascii pfiles? Also, when I do a linkload

in read_file():

- struct char_file_u player
+ int level;
+ char name[80];

change fopen() mode from "rb" to "r"
(not positive it's necessary but I always do it)

change the while(!feof(fl)) to

while(!feof(fl)) {
        if(fscanf(fl, "%*d %s %d %*s %*d", &name, &level)) != 2) break;
        if(level >= MIN_LEVEL) add_name(name, level);

I just ignore the flags in this loop because, well, it's a bit hard to
type all that with a broken wrist.  Easy enough to figure out though.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/05/01 PST