Recently while creating a new plugin, I've had to edit the .mcl directly and have accidentally made the mcl unloadable (i.e accidentally deleting a <send> leaving a trigger or an alias unrecognized by mushclient). However, when mushclient fails to load that mcl, it doesn't specify which line, trigger or alias it had trouble with - requiring me to look through the mcl manually to see what's wrong. If there isn't already some existing way of identifying where errors are in mcl files, can mushclient be updated so it presents the user with more friendly error messages?
Friendlier mcl load failure errors
Posted by Victorious on Wed 27 Nov 2013 06:51 AM — 4 posts, 21,065 views.
Yes, I see your point. That wasn't helpful was it?
One method (and admittedly this isn't obvious) is to open another world file (or make a small temporary one) and then use File -> Import to load in your rogue .mcl file. I tested by deleting a </send> from a working world file, and then doing an import, and got this:
That took me straight to the offending line (221). Actually at the end of 220, but it noticed at the start of 221 that the </send> was missing.
One method (and admittedly this isn't obvious) is to open another world file (or make a small temporary one) and then use File -> Import to load in your rogue .mcl file. I tested by deleting a </send> from a working world file, and then doing an import, and got this:
[WARNING] C:\Program Files\MUSHclient\worlds\whatever.MCL
Line 221: Elements terminated out of sequence, expected </send>, got </trigger> (Cannot load)
That took me straight to the offending line (221). Actually at the end of 220, but it noticed at the start of 221 that the </send> was missing.
Wow, thanks so much for the quick fix in 4.92 and that tip on importing an mcl.