Register forum user name Search FAQ

Gammon Forum

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 ➜ Jscript ➜ error using save("");

error using save("");

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #15 on Thu 26 Feb 2009 02:07 AM (UTC)
Message
Also see this:

http://www.gammon.com.au/forum/?id=8855

http://www.gammon.com.au/forum/?id=4964

Quote:

World file is named KoD, another one named KoD2. Both have the same timer and experience the same problem.


So it is actually KoD.mcl on disk?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #16 on Thu 26 Feb 2009 02:22 AM (UTC)
Message
Also can you see if you can find a file named something like MFCxx.tmp in your MUSHclient directory tree? And if so, does it have inside it what looks like your world file?

Another thing to look into is, does MUSHclient have write access to whatever directory that file is in?

And possibly, if you have been saving every 5 minutes for a few weeks, maybe you have thousands of these files and it can't fit any more there. Maybe.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #17 on Thu 26 Feb 2009 02:30 AM (UTC)
Message
Here is another thing to try. Edit the plugin, and replace:


if GetInfo (111) then  -- world file changed?
  if Save () == false then
    ColourNote ("green", "", "World file saved.")
  else
    ColourNote ("white", "red", "Couldn't save world file.")
  end -- if
end -- if world file changed


By:


if GetInfo (111) then  -- world file changed?
  DoCommand ("save")
end -- if world file changed


This saves in a different way - effectively being as if you clicked on File -> Save.

Since that is done a different way, maybe it will work better. Since there is no error return, you would need to check that the file actually saves, by looking at the date/time stamp.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by KatAngel   (9 posts)  Bio
Date Reply #18 on Thu 26 Feb 2009 03:46 AM (UTC)
Message
Ok... let me try to answer all these questions. Hopefully I don't miss any.

Yes, it pops up as a dialogue box. When I click ok, all timers fail to work until I reset them.

Yes, it is KoD.mcl on the disk. (By that token, no, it doesn't have a dash in it.)

There are 747 MFCxxxx.tmp files in the MUSHclient/worlds directory! I'll delete them, but I don't think it's a problem with anything as far as write permissions, capacity, etc. go, because it DOES save successfully 95% of the time. I'm going to go the DoCommand route, because I've never had a problem saving from the file menu before. If I'd known about that function, I'd have just tried that before I posted anything; somehow, I overlooked it.

Also, I've noticed that GetInfo(111) doesn't reflect changes to world-internal variables. Is there any way to detect changes in those?
Top

Posted by KatAngel   (9 posts)  Bio
Date Reply #19 on Thu 26 Feb 2009 03:51 AM (UTC)

Amended on Thu 26 Feb 2009 03:53 AM (UTC) by KatAngel

Message
I'll also mention that, when using the save(""); function, both in JScript and in the LUA plugin you gave me, if MUSHclient crashed (which, my computer crashed a little bit ago, hense the reason for the autosave in the first place :P) any changes I've made still aren't reflected. The modified date changes, but it doesn't actually save anything new, it just seems to rewrite the world file with the exact same data.

I should clarify, it seems to save changes to triggers, timers, etc., but this is like the fourth time I've changed one of the custom colors.
Top

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #20 on Thu 26 Feb 2009 04:29 AM (UTC)
Message
Quote:

Also, I've noticed that GetInfo(111) doesn't reflect changes to world-internal variables. Is there any way to detect changes in those?


It seemed to work for me. Er, well it worked if I changed the variable in the GUI. It seems that SetVariable doesn't set that flag. I have added a new GetInfo (118) in version 4.41 that would let you query that.

Meanwhile, you could make your own SetVariable function that sets the variable, and also sets a flag you can check.

As for the absence of changes, that seems to support the idea mentioned on some other web sites, that it actually writes a temporary file, and then fails to rename it. Thus, something got written, just not to the actual world file. Deleting those temporary files may help, at least in the short term.



- 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.


80,177 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.