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 ➜ Bug reports ➜ Save World Automatically On Close

Save World Automatically On Close

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


Posted by Chyort   USA  (58 posts)  Bio
Date Mon 06 Apr 2015 04:05 AM (UTC)
Message
Version 4.84

The "save world automatically on close" feature isn't working when i change a variable using an alias.


<aliases>
  <alias
   match="test *"
   enabled="y"
   expand_variables="y"
   send_to="12"
   sequence="100"
  >
  <send>Note ("Test is @test")
SetVariable ("Test", "%1")
Note ("Test is now %1")</send>
  </alias>
</aliases>

<variables>
  <variable name="Test">1</variable>
</variables>



The problem is, it is VERY sporadic. One second it will save, the next it wont, which makes attempting to replicate it mind numbing.

Made a completely blank new world, no plugins/anything.
Added that alias, and starting variable, then saved manually and closed.

Then

Open the world.
Change the variable.
Close the world.
Repeat

Sometimes the variable will save, sometimes it wont.


Any help would be appreciated.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 06 Apr 2015 06:32 AM (UTC)
Message
In Global Preferences -> Closing, do you have "Offer to save world if only variables have changed" checked?

- Nick Gammon

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

Posted by Chyort   USA  (58 posts)  Bio
Date Reply #2 on Mon 06 Apr 2015 01:47 PM (UTC)

Amended on Mon 06 Apr 2015 01:48 PM (UTC) by Chyort

Message
I have used it from time to time, but currently no.

I often multi 8 characters at once and dislike having to constantly deal with the dialog box that pops up.



I currently have Save("") tacked into my real variable setting alias, not the simplified tester i posted. But that is causing a conflict with my sync program, which likes to lock write access for a split second after a file changes. So if i try to change 2 variables somewhat fast i sometimes get a different dialog box telling me access was denied.

That however isn't a Mush problem, it is a sync safety feature that i don't see being changed. If i can reduce the frequency of saves though, i reduce the chances of a conflict with my sync program, bringing me back to the Save world automatically on close.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 06 Apr 2015 09:13 PM (UTC)
Message
It appears that changing a variable does not mark the document as having changed, and thus it won't be saved. I think this is because of the option "only save changed variables". Instead of marking the document as changed, it marks the variables as having changed. Then it can test for just variables changing, and bypass saving the (world) document if that is the only change.

Now as a work-around you can delete the variable, which appears to mark the document as changed.

eg.


DeleteVariable ("Test")
SetVariable ("Test", "%1")

- Nick Gammon

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

Posted by Chyort   USA  (58 posts)  Bio
Date Reply #4 on Mon 06 Apr 2015 10:18 PM (UTC)
Message
As you said, a bit of a work-around. But it is still better than forcing potentially dozens of extra saves per world file.


And after a quick test on my end, it appears to be working.

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


14,055 views.

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.