Can someone see something wrong with this function to print out skills
to comma delimited file?
void do_skillcd(CHAR_DATA *ch,char *argument)
{
char arg1[MIL];
char buf[MSL];
int i;
int skill;
int x;
FILE *fp;
fclose( fpReserve );
fp = fopen("../../public_html/files/skillcd.txt", "w" );
fprintf (fp,"Class");
for (x = 0; x < MAX_CLASS; x++);
{
sprintf(buf, ",%s",class_table[x].name);
fprintf(fp, buf);
}
sprintf(buf,"\n");
fprintf(fp,buf);
for (sn = 0; sn < MAX_SKILL; sn++)
{
sprintf(buf,"%s",skill_table[sn].name);
fprintf(fp, buf);
for (i=0; i < MAX_CLASS; i++)
{
sprintf(buf,",%d",skill_table[sn].skill_level[i]);
fprintf(fp, buf);
}
sprintf(buf,"\n");
fprintf(fp,buf);
}
fclose( fp );
send_to_char("Done writing\n\r",ch);
fpReserve = fopen( NULL_FILE, "r" );
return;
}
Thanks,
Keith Mervine
"Non Omnis Moriar"
"Growing old is mandatory, growing up is optional"
Service Management Application Developer
International Monetary Fund
[EMAIL PROTECTED]
202-623-7610