• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • Due to the current COVID-19 situation, we are giving out free extended private licenses for a couple of days to assist you in getting more friends to #stayhome and enjoy some music listening with you. You can read more about it here.

EN what's wrong with my fs.writeFile

Kuchi

Donor
is awesome!
I'm trying to read and write to a text file and the read is working but the write not working
please help the stupid guy here :\
file CHMOD is 777 (for testing)
I have the last version : 1.0.0-beta.10-202ee4d

read is working
fs.readFile('/opt/sinusbot/data/output.txt');

write is not working
fs.writeFile('/opt/sinusbot/data/output.txt', 'try to write this text', 0777);
fs.writeFile('/opt/sinusbot/data/output.txt', 'try to write this text');


error

error on callback func: Uncaught exception: Error: unexpected parameter type at testbot:568:3 fs.writeFile("/opt/sinusbot/data/output.txt", "try to write this text", 0777); ^ Stack trace: Error: unexpected parameter type at testbot:568:4

[Edit]
I'm so stupid !
I didn't use the bytesFromString() ...


thanks for the help guys
 
Last edited:
Thread starter Similar threads Forum Replies Date
Wedz0ff Script Development 9
Kamikaze Script Development 2

Similar threads

Top