"ForReading" is a constant, but it isn't defined in Plus! scripts. You'll have to assign its value yourself at the very top of your script, so add:
code:
var ForReading = 1
at the top of your script.
But more important: a timer interval of 1000 is
waaay too low! No wonder you end up with troubles, because:
- Messenger itself doesn't allow you to update it that frequently. Okay, it may look like it works, but it won't actually update on the servers.
- the file is being read too often! Every second, it has to be opened, read and closed again. That's just way too much.
My recommendation: change the interval. Make it at least 15 seconds (15000 milliseconds) or, to spare your contacts from flooding their logs with your personal message updates, make it one minute (60000 ms) or more. There should really be
no reason to update your PSM that often.