>This works...but will this DO the same thing?
Not quite:
Before:
Stats 10 20 30 40
After:
Stats 10
20
30
40
I'm actually not sure why you want to do this. All ROM files save in
the following format:
<key> <values>
E.g.
Sex 1
Levl 60
Plyd 229073
ACs 88 86 87 94
Attr 13 14 13 13 13
AMod 0 0 0 0 0
In fact, every line in the pfile follows that format, but I realize
you're talking about areas instead. As for if it actually working or
not..well, I'm too lazy to check. :) I think it will, but it does
somewhat break convention.
[EMAIL PROTECTED] wrote:
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!!!