- Joined
- Oct 11, 2015
- Messages
- 426
- Reaction score
- 173
- First Language
- Dutch
- Primarily Uses
- RMMV
JavaScript:
pictureExists = function(filename) { // filename must include file extension.
const fs = require ("fs");
return fs.existsSync("./img/pictures" + filename);
};
See also here.
The code above works in the editor but after deploying my project, it always returns false. How do I make this work for both cases (on all platforms)?
Last edited: