02.03.2015, 16:06
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
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