You can avoid using fseek() by adding 2 new-lines (^n^n) at the end of your text. Since you currently end your file write with "}", the next append is going to begin immediately after that character, it does not know that you first want to insert 2 new-lines before writing the new text.
Code:
strcat(text,"^"^n}^n^n}",128)
//to
strcat(text,"^"^n}^n^n}^n^n", charsmax( text ) )
Also, if your string is already prepared/formatted for writing (which it is since you used strcat()), you do not need to use fprintf(), you can use fputs() instead.
fprint() would be appropriate if you wanted to do this.
PHP Code:
new text[ 128 ]
new const Fname[] = "test";
new pList = fopen( "default_plugins.txt" , "a" )
if ( pList )
{
fprintf(pList, "^"plugin^"{^n^"name^" ^"%s^"^n^"scRipt^" ^"%s^"^n}^n^n}^n^n" , Fname , Fname )
fclose(pList)
}
__________________