Data is not OverWriting
#3

You used io_append, that will only append the data and not overwrite it
You need to copy the complete file into memory or a tmp file, see ftemp() (it is opened in io_readwrite)
After you copied everything into the tmp file, you read line for line and copy the data back into the main file
If it hits "Ban" or "BanTime" than you add your new lines instead of the old

Edit: you can also do it like darklord said than you don't need a tmp file
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)