Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ Weirdness with SaveNotepad
Weirdness with SaveNotepad
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Sat 21 Jul 2007 04:08 PM (UTC) |
Message
| This may be just because I'm running MUSHclient in wine, but I'm always getting 0 back from SaveNotepad. I ran /print(SaveNotepad ("challenge", "c:/Program Files/MUSHclient/challenge.txt", 0)) and got a 0, then catted it, rmed it, then saved it again. Still got a 0 returned, but the file was saved correctly. Then I updated the notepad a bit, and ran it again without erasing the file. It was overwritten... So I mucked about with the data again, then saved with /print(SaveNotepad ("challenge", "c:/Program Files/MUSHclient/challenge.txt", 1)) instead, got a 0 returned, and the file was overwritten.
My apologies if this made no sense, or I've gotten quite confused here. I've been up for far too long to make much sense. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 21 Jul 2007 10:51 PM (UTC) |
Message
| I see what you mean. There are two problems here:
- The sense of the returned value was inadvertently reversed. Zero is meaning a good save. I will fix that in version 4.14 onwards to conform with the documentation.
- The "replaceexisting" flag didn't do what I thought it did, and the documentation is therefore wrong. I have amended the online version now, and the fixed help file will ship with version 4.14 onwards:
http://www.gammon.com.au/scripts/doc.php?function=SaveNotepad
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,410 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top