Data is not OverWriting
#10

The first parameter is the filename not the handle

Also I am not sure if strcmp will find only the part of the string, if it doesn't work edit it to that

pawn Код:
fRemoveLine(file[],line[])//By: Firecat
{
    new string[256],
        len = strlen(line), // added
        File:Temp = fopen("Temp.ini",io_append),
        File:Main = fopen(file,io_read);

    while(fread(Main,string))
    {
        if(strcmp(string,line,false,len) != 0) // changed
        {
            fwrite(Temp,string);
        }
    }
    // rest stays the same
Reply


Messages In This Thread
Data is not OverWriting - by rockhopper - 02.03.2015, 12:46
Re: Data is not OverWriting - by -=Dar[K]Lord=- - 02.03.2015, 13:08
AW: Data is not OverWriting - by Nero_3D - 02.03.2015, 13:08
Re: Data is not OverWriting - by rockhopper - 02.03.2015, 13:11
Re: Data is not OverWriting - by rockhopper - 02.03.2015, 14:03
Re: Data is not OverWriting - by Vince - 02.03.2015, 14:14
Re: Data is not OverWriting - by rockhopper - 02.03.2015, 14:24
Re : Data is not OverWriting - by Nero_3D - 02.03.2015, 15:34
Re: Data is not OverWriting - by rockhopper - 02.03.2015, 15:41
AW: Data is not OverWriting - by Nero_3D - 02.03.2015, 16:06

Forum Jump:


Users browsing this thread: 2 Guest(s)