missing the obvious? triggers not saving

Post Reply
oldtimer
Posts: 2
Joined: Tue May 30, 2017 7:16 pm

missing the obvious? triggers not saving

Post by oldtimer »

Hello all - just installed on MacOS. I created a new profile to my MUD, connected, created some triggers that seemed to work fine. In the profile window, I used both the 'save' and the 'save profile' buttons after creating triggers and also saved again when exiting mudlet (was prompted). After restarting and selecting triggers, my triggers are gone. I've tried this several times and while I'm able to export triggers (although this had its own weird behaviors), I can't seem to get these to attach to the profile and reappear after restarting the client. Am I missing something? Thanks

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: missing the obvious? triggers not saving

Post by Vadi »

Hey! Sorry about your problem. Could you record a video of what happens? Maybe I'll be able to see a detail in it.

oldtimer
Posts: 2
Joined: Tue May 30, 2017 7:16 pm

Re: missing the obvious? triggers not saving

Post by oldtimer »

Thanks for the quick reply. It seems to have resolved itself but not sure how. Searching other topics pointed me to the XML file for the profile. Opening it with safari (default) displayed "error on line 5 at column 466: Char 0x0 out of allowed range". Opening it in a text editor, I saw my trigger(s), but relaunching the client they weren't visible. Somewhere along the way of retrying this over and over it started to work. Interestingly enough, when I look at the profile folder with all the XML files, the icons from when it wasn't working are a safari-related XML icon, and after it started working, the icons are a text/document-related XML icon.

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: missing the obvious? triggers not saving

Post by SlySven »

The game save data (in the ~/.config/mudlet/profiles/<profile name>/current/<dateTimeStamp>.xml) files is indeed saved as an XML file - the specifications for the 1.0 version (as 1.1, although over ten years old, has never been adopted into Qt) explicitly disallow any ASCII control characters (those less than 0x20 which is the "space" character) except for Line-Feed, Carriage-Return and Horizontal Tab {1.1 does allow them in a certain form, except for the very first the Null character 0x0 which - as it is also used internally by C & C++ code to mark the end of "string" would be very confusing/awkward/hard to use otherwise.}

The bottom line is that a 0x0 character WILL cause problems and should NEVER appear in a text format file such as a XML one. It is likely that Mudlet will stop reading a file at that point and then lose everything afterwards. That is likely why your triggers were no longer visible - they got lost. It may be possible to recover most of the original one that caused the problem if you can open it in a hex editor (I would use GHex :geek: ) and convert the null (0x00) character to a space (0x20) but it is not something that everyone would necessarily contemplate doing!

A recent fix to the development code will now allow the user to use a literal ASCII code - i.e. to have something like "Ring my \07 Bell!" where \07 is a representation of the ASCII 0x7 character a.k.a. Bell (or beep) originally intended to causing an audible warning on the receiving terminal.

Post Reply