Code:

sprintf(buffer, "%%%d[^,],%%%d[^,],%%%d[^,],%%%d[^,],"
"%%%d[^,],%%%d[^,],%%%d[^,],%%%d[^,],%%%d[^,],%%%d[^,],",
(int)(sizeof(data[x].name)-1),(int)(sizeof(data[x].PeriTime)-1),
(int)(sizeof(data[x].PeriAU)-1),(int)(sizeof(data[x].Eccent)-1),
(int)(sizeof(data[x].LongPeri)-1),(int)(sizeof(data[x].LongNode)-1),
(int)(sizeof(data[x].Inclin)-1),(int)(sizeof(data[x].Semi)-1),
(int)(sizeof(data[x].Period)-1),(int)(sizeof(data[x].MPC)-1));
//line 58
while(fscanf(infile,buffer,data[x].name,data[x].PeriTime,data[x].PeriAU,
data[x].Eccent,data[x].LongPeri,data[x].LongNode,data[x].Inclin,
data[x].Semi,data[x].Period,data[x].MPC)==10)
{
fscanf(infile,buffer,data[x].name,data[x].PeriTime,data[x].PeriAU,
data[x].Eccent,data[x].LongPeri,data[x].LongNode,data[x].Inclin,
data[x].Semi,data[x].Period,data[x].MPC);
x++;
}

what did i do wrong?