CAN_SEE error...continued

From: Chris Powell (darkness@CHESHIRE.GATOR.NET)
Date: 05/02/98


Ok I narrowed it down to my new code.  My experience with file I/O is
about nil so if what I did is stupid, don't be to harsh.
Here's the segment that seems to be causing my problems.

void init_spell_levels(void)
{
int i, j;
FILE *fl = NULL;
char dname[100];
extern struct spell_level_type spell_level[];

for (i = 0; i < NUM_CLASSES; i ++) {
    sprintf(dname, "%s/%s.level", CLS_PREFIX, pc_class_files[i]);

  for (j = 0; j < MAX_SKILLS; j ++)
    spell_level[j].min_level[i] = 50;

  if (!(fl = fopen(dname, "r"))) {
    sprintf(buf1, "SYSERR: opening class file '%s'", dname);
    perror(buf1);
    exit(1);
  }
    parse_spell_level(fl, i);
    fclose(fl);
}

}


Chris Powell           * I don't have bugs, I have   * I don't crash, I
http://patch.gator.net * randomly developed features * have random reboots


     +------------------------------------------------------------+
     | 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