Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causes issues with (saved-games:) macro? #9

Open
bandcandyliz opened this issue Jun 13, 2024 · 4 comments
Open

Causes issues with (saved-games:) macro? #9

bandcandyliz opened this issue Jun 13, 2024 · 4 comments

Comments

@bandcandyliz
Copy link

bandcandyliz commented Jun 13, 2024

First off, thank you for working on this! My game became quite hefty and this could be a lifesaver for me.

The macros appear to work for me, however, there seems to be some sort of conflict with the (saved-games:) macro?

I was planning on using a Quicksave option as the only save slot that goes into DOM storage, then another 5 save slots that would save to disk instead. If I save to one save slot and then load it, it appears to work correctly, but the following code throws out errors ONLY after loading a game through your save-to-file macros:

(set: _existing to (saved-games:))

Which throws out the error:
Internal error occurred while trying to run (set: _existing to (saved-games:))

EDIT: Clearing the DOM storage appears to temporarily fix the error until another save-to-disk is made.

Unless I'm missing something, it appears the only solution would be to change my code to rely solely on the save-to-disk option, that way I won't need to mess with the (saved-games:) macro at all?

@Kajot-dev
Copy link
Owner

What version of Harlowe are you using? From time to time, it breaks compatibility and I need to modify it to make it work again.

Breaking (saved-games:) macro is definitely not intended. Please provide exact version of Harlowe so I can reproduce and fix this

@bandcandyliz
Copy link
Author

bandcandyliz commented Aug 1, 2024

What version of Harlowe are you using? From time to time, it breaks compatibility and I need to modify it to make it work again.

Breaking (saved-games:) macro is definitely not intended. Please provide exact version of Harlowe so I can reproduce and fix this

I was using 3.3.8 at the time, but I'm making the switch to 3.3.9 and have yet to test it with this version.

@Kajot-dev
Copy link
Owner

Ok, will try to make it compatible with 3.3.9

@Kajot-dev
Copy link
Owner

@bandcandyliz I just tested this with 3.3.9 and cannot reproduce the bug.

I'm testing with something like this:

(link-repeat: "Show saved games")[(replace: ?s)[(set: _existing to (saved-games:))(if: (dm-names: _existing)'s length is 0)[There are no saved games.](else:)[(verbatim-print: (joined: ", ", ...(dm-names: _existing)))]]] []<s|

And for me it works every time (even after reading a save from file)

Here is an updated demo, try to import it and test with 3.3.9: https://raw.githubusercontent.com/Kajot-dev/Twine-Harlowe-Save-To_File/master/SaveToFileDemo.html

Can you send me your exported story with step-by-step explanation how to trigger the bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants