HTML Twine 2.10 with sugarcube 3.37.3 Save/Load

Marduk73

Newbie
Jul 19, 2021
22
5
Hello folks; Twine 2.10 with Sugarcube 3.37.3 makes me despair. At the end of a day, I get to a diary in which the most important events of the day are summarized, after which it goes to the next morning, this is done via a button. So far so functions. But, I want him to make a autosave at this point, which I can then continue as a sequel in the intro. But no matter how, he only give a error. Help...
 

Greeedium

Newbie
Dec 17, 2021
41
26
Have you tried the docs?


Code:
Config.saves.isAllowed = function (saveType) {
    if (saveType === Save.Type.Auto) {
        return tags().includes("autosave");
    }

    return true;
};
Then adding the "autosave" tag to every passage that should trigger an autosave?
 
  • Like
Reactions: HiEv

Marduk73

Newbie
Jul 19, 2021
22
5
That's correct, but it should only create an autosave at this exact point, not after every passage. this is my version:
Code:
Config.saves.autosave = ["autosave"];
Config.saves.autoload = null;
Config.saves.isAllowed = function () {
    return !tags().includes("nosave");
};
 

Greeedium

Newbie
Dec 17, 2021
41
26
Huh, but the code i sent you is only saving on Passages where the tag is == autosave.

Your current code is only saying, Only allow the Player to save when the Passage doesnt have a "nosave" Tag.

It has nothing to do with autosaving.

add me on Discord greedium_ , so I can reply faster, also you can send me your code in a better format.