Ui-dialog saving error message

Twine Version: 2.8.0 [SugarCube 2.36.1]

Hello everyone! I’ve been personalising the UIBar’s save menu, and have stumbled across the following message:

An error has occurred. You may be able to continue, but some parts
may not work properly.
Error [tw-user-script-0]: saves is not defined.

Should I be defining a blank number of save files at all, or it is a matter of having accidentally removed elements of the original save script?

Now, please be aware that, while I now have a very nice looking and functional save menu, I achieved this solely through trial and error, and would not be surprised if I had compromised the original JavaScript in some way. Also know that the ui-bar was personalised through hide and destroy script functions and some heavy additions to the stylesheet.

I have published the project to a file and then removed some pesky elements relating to the initial screen in the notepad.
Hercules at the Crossroads.zip (190.7 KB)

Thanks to anyone who can help!

I’d imagine it is because of this: saves-list.destroy(); (and then Setup.saves = {};) that you get errors.
(Also in Sugarcube, you use setup not Setup)
Just remove the two and your project will work fine.



are the same thing. If you want the Sidebar gone, you could just use UIBar.destroy()
You can also use the special passage StoryInterface to change which elements are on the page. That can also remove the side-bar completely… by not including it in the code.

1 Like

Fantastic, thanks Manon!
I’ve yet to play around with the StoryInterface passage: perhaps I’ll feel daring enough in the next project I set myself. All the same, I feel rather gratified if what you pointed out is all I’d majorly messed up.
All the best

1 Like