Browse Source

fix false error when receiving write messages

main
TFLCL 4 weeks ago
parent
commit
6f7ac37a05
  1. 4
      code/tc.preset.js

4
code/tc.preset.js

@ -930,9 +930,9 @@ function lockedslots() {
} }
function write() { function write() {
var args = arrayfromargs(arguments);
if (is_writing) { if (is_writing) {
is_writing = 0; is_writing = 0;
var args = arrayfromargs(arguments);
var filename = args[0]; var filename = args[0];
var state = args[1]; var state = args[1];
if (state) { if (state) {
@ -941,8 +941,10 @@ function write() {
error(pattrstorage_name + ': error while writing ' + filename + '\n'); error(pattrstorage_name + ': error while writing ' + filename + '\n');
} }
} else { } else {
if (args.length < 2) {
error("Send your write messages directly to the pattrstorage instead.\n"); error("Send your write messages directly to the pattrstorage instead.\n");
} }
}
} }

Loading…
Cancel
Save