SA-MP Forums Archive
FileManager f_write problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: FileManager f_write problem (/showthread.php?tid=664760)



FileManager f_write problem - NoteND - 10.03.2019

Hey!

Why wouldnt this code write anything ? No matter if I change mode on top to "w" as write, still nothing.

PHP Code:
new File:Test;
Test f_open("scriptfiles/test.txt""a");
if(!
Test)
{
      
file_create("scriptfiles/test.txt");
      
f_write(Test"hello");

I'm using FileManager 1.4 plugin and include.


Re: FileManager f_write problem - NoteND - 10.03.2019

Quote:
Originally Posted by Y_Less
View Post
Because you test that the file didn't open. You can't write to a file you failed to open.
I use "file_create"tho