How do I use the on 'save' and on 'read' functions? When I'm doing it like this:
const user = new SteamUser();
user.logOn();
user.storage.on('save', function(filename, contents, callback) {
// filename is the name of the file, as a string
// contents is a Buffer containing the file's contents
// callback is a function which you MUST call on completion or error, with a single error argument
// For example:
console.log(filename, contents, callback);
});
user.storage.on('read', function(filename, callback) {
// filename is the name of the file, as a string
// callback is a function which you MUST call on completion or error, with an error argument and a Buffer argument
// For example:
console.log(filename, callback);
});I just get the output on start of my electron app:
cellid-86[...].txt 91 (err) {
if(callback) {
callback(err || null); }
}
servers.json [91, 10, 9…] (err) {
if(callback) {
callback(err || null); }
} So first this 'cellid-...txt' file and then the 'server.json'. But when I start an actual game via steam and close it the 'save' or 'read' event functions aren't called.