Oh dear... and I made a mistake. I forgot to change append to write in the code. Sorry. It should be file_open_write instead of file_open_append:

Code:
action replaceFile()
{
	myFile1 = file_open_read(fileString); //open file 1
	myFile2 = file_open_write(fileStringCopy); //open file 2
	if (myFile1 == 0) {fileOpen = 0;}
	var ii = 0;
	var skipLine = 0;
	while (ii < 91)
	{
		ii += 1;
		//when the line is reached...
		if (skipLine == 0 && ii == lineToRead) {skipLine = 1;} //...indicate
		file_str_read(myFile1,WordText); //read a line from file 1
		if (skipLine != 1) //as long as the line is not read...
		{
			str_cpy(newString,WordText); //...copy
			file_str_write(myFile2,newString); //...write a line to file 2
			file_str_write(myFile2,","); //place a comma after
		}
		str_cpy((testing.pstring)[0], newString); //check word on screen
		if (skipLine == 1) {skipLine = 2;} // indicate that the line is read
		if (ii >= 91) //when all lines are read...
		{
			file_close(myFile1); //close files
			file_close(myFile2);
			fileOpen = 0; 
			ent_remove(me); //remove temporary entity
			temp = ent_create("mark.mdl",vector(0,0,0),recheck);
			break; //stop the loop
		}
		wait(1);
	}
}