21.11.2012, 18:38
Ok, i have decided to go through wiki and 're-learn' everything in there and also read the pdf's on compuphase in order to get a better understanding on the pawn language. I have found a problem, after doing about files it seems i cant write a new line for example:
It will simply put line 1 and never line 2. I have put \r\n (new line) and yet it does not write a new line, is there anything I'm doing wrong?
Код:
line 1 line2
pawn Код:
if (strcmp("/file", cmdtext, true, 10) == 0)
{
new File:file=fopen("test.txt", io_write);
if(file)
{
fwrite(file, "This text has been written to the file\r\n");
fclose(file);
}
return 1;
}