Why not do just that.
fprintf( fp, "Stat1 %d %d %d %d %d\n",stat1,stat2,stat3,stat4,stat5);
fprintf( fp, "Stat2 %d %d %d %d %d\n",stat6,stat7,stat8,stat9,stat10);
And in the read....
Case 'S':
if (!str_cmp(word,"Stat1"))
{
ch->stat1 = fread_number(fp);
ch->stat2 = fread_number(fp);
ch->stat3 = fread_number(fp);
ch->stat4 = fread_number(fp);
ch->stat5 = fread_number(fp);
fMatch = TRUE;
break;
}
if (!str_cmp(word,"Stat2"))
{
ch->stat6 = fread_number(fp);
ch->stat7 = fread_number(fp);
ch->stat8 = fread_number(fp);
ch->stat9 = fread_number(fp);
ch->stat10 = fread_number(fp);
fMatch = TRUE;
break;
}
break;
This breaks them up under different keywords though. I'm not sure that
if this is what you mean but it does break them down nicely
-K
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 11:46 PM
To: [email protected]
Subject: Re:Files
I just realized I explained my previous email very badly.
Here I go again!
I had:
Stat %d x10
I wanted to make it like this:
Stat1 %dx5
Stat2 %dx5
However, it was deleting all of the stats and all the infornmation was
lost so I
couldn't break it up in two lines...that is why I want to place a \n in
the
middle of the single line lol.
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom