So, I am not that well versed in file processing. I know enough to add things to
players, areas, rooms, etc, but not that skilled in writing my own file
processing functions or anything new.

I am adding some code to the area files right now and I am wondering about the
way it is saved...
let me explain

Let's say we have this for saving:
fprintf(fp, "Stats %d %d %d %d\n", stat1, stat2, stat3, stat4);

and this for loading:
stat1 = fread_number( fp );
stat2 = fread_number( fp );
stat3 = fread_number( fp );
stat4 = fread_number( fp );

This works...but will this DO the same thing?

Saving:
fprintf(fp, "Stats %d\n%d\n%d\n%d\n", stat1, stat2, stat3, stat4);

Loading:
stat1 = fread_number( fp );
stat2 = fread_number( fp );
stat3 = fread_number( fp );
stat4 = fread_number( fp );

How does \n affect the file pointer?

THANKS!!!

Reply via email to