When I use fputs() I can only save 1 line in a .ini or .cfg file.
Im using it like this
Code:
public do_savecmd(id,szNewcmd[],szOldcmd[], szType[])
{
new iFile = fopen(Path, "w");
if( !iFile )
return;
new const szData[100];
format(szData,sizeof(szData)-1, "^"%s^" ^"%s^" ^"%s^"",szNewcmd,szOldcmd, szType)
fputs(iFile, szData);
fclose(iFile);
console_print(id, "New Command : %s",szNewcmd)
console_print(id, "Old Command : %s",szOldcmd)
console_print(id, "Type : %s", szType)
}
So when I put something in the file, it goes in there. but when I want to put something new in it. It deletes the first line and puts in the new.
__________________