• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN what's wrong with my fs.writeFile

Kuchi

Active Member
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:
Top