All the projects I've created have broken, I can enter them yet they are completly blank(despite my putting work into them). Even the "published" one, however it can still be played via the play online option. Odd since the project it'self is blank. Anyone know how this happened? and if it can be fixed? Are the projects stored browser-based, or through the website?
One frequently helpful person on this forum is mrangel. They made a tool for recovering Squiffy code from story.js. This saved my oldest game that I published years ago when I wanted to update and add to it.
It's not a good idea to trust the online version of Squiffy too much. Think of it as a demo. Download the desktop version and use that.
Projects are stored on the site; but sometimes browser stuff (form auto-completion and adblockers) can make a mess when they're loading. If you open a project and it comes up blank, it may help to close it immediately (so it doesn't auto-save), disable browser extensions, and try again. Possibly also clearing data/cookies for the site to make sure you get the version from the site.
If it's already saved the blank version, this makes it harder to recover. But if you have a published version, you can unzip it and paste the
story.js file into a quick bodge I made a while back (thanks to IFforClassroom for sharing the link) and it will do its best to recreate the Squiffy source file.
This isn't perfect; if there's anything that doesn't work properly, I would appreciate somebody letting me know what code it spits out, and what it should give you.
I use the desktop version exclusively, and I don't even trust that. I save a session version each time I sit down to work in case I mess something up and can't solve a JS issue I've accidentally introduced.
Of course, having said that, I still can't load my game now and have no idea what might have gone wrong. Weeks pass. Seasons change...
Private messaging appears to be out of order.
@set @replace bug is now corrected to
What should say
@replace 1=[[LinkLabel]](SomeSection) still becomes
@replace 1=<p><a class="squiffy-link link-section" data-section="SomeSection" role="link" tabindex="0">LinkLabel</a></p>.
Ah… that's frustrating. I guess that the same translations that apply to text sections should be run on the right hand side of @replace blocks.
Are there any other @ keywords this issue applies to, or is it just @replace?
(I've never used it, so not sure of how it's supposed to work)
The only @ keywords allowed on the far left without curly brackets are:
In the default section:
In other sections:
I haven't tried out continue links because I never use them. You've already kindly resolved problems with @clear and @set. @replace now works unless section or passage links are included in the replacement text, as above.
I can't thank you enough for making desquiff!
Yeah; I was asking whether the problem with embedded formatting occurs in other @ commands.
I can check it myself :)
Well… looks like you can't use
@set to put a
[[section link]] inside an attribute; so it is only @replace. Right, I'll try fixing that :)
Sorry! What I meant was all other @ commands appear to work correctly; you fixed @set and @clear a while ago.
I just tried DeSquiff again and it's not spitting anything out.
Ah…must have messed something up through sleepy code.
I'll try to remember to take another look at it later.
DeSquiff is back up and working! Thanks, mrangel. It still turns Squiffy bracket links into longform html links when included in @replace. The longform links do actually work, so it's not a critical issue.
OK, here's another try.
Sorry I'm going really slowly on this one; I've not got any actual
story.js files at hand for testing, and am behind on my actual work so don't have time to roll some up.
I'm pretty sure I didn't actually break it this time; but if I did could you press Ctrl+Shift+J and see if there's errors in the log?
Not at all. Thanks for making this marvelous thing!
Earlier, before you fixed it , when I pasted in the complete text of a story.js, Chrome reported the following:
desquiff.html:42 Uncaught TypeError: String.prototype.replaceAll called with a non-global RegExp argument
at String.replaceAll (
When I pasted a URL of a story.js file, Chrome reported the same.
Thank you, mrangel, for existing. Please continue to do so insofar as it's up to you.
(I am not sure whether there will still be weirdness with either of:
That absolutely fixed it! Links inside @replace now appear exactly as they should! May your actual work be every bit as profitable as your text adventure work is helpful!