# Problems getting the new checkpoint system to restore player named saves- Could I use goto instead of gosub?

**URL:** <https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669>\
**Category:** ChoiceScript Help\
**Created:** [April 22, 2024, 9:00pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669 "2024-04-22T21:00:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![NumberedEntity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/numberedentity/32/210906_2.png) [@NumberedEntity](https://forum.choiceofgames.com/u/NumberedEntity)\
**Post date:** [April 22, 2024, 9:00pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/1 "2024-04-22T21:00:44Z")

</div>

Hi everyone,

I’m trying to implement the new checkpoint save system. I want to allow players to name their saves.

I have followed the instructions given on this forum and the choice-script website and set the saves and restores up in a gosub.

\*_label save_

\*_temp slot_  
_Which slot do you want to save?_  
\*_fake\_choice_

- #Slot 1: ${save\_name\_1}\*
- 

```
   *set slot 1*

```

- #Slot 2: ${save\_name\_2}\*
- 

```
   *set slot 2*

```

- #Slot 3: ${save\_name\_3}\*
- 

```
   *set slot 3*

```

- #Cancel\*
- 

```
   *return*

```

_What do you want to call your saved game?_  
\*_input\_text save\_name[slot]_  
\*_if slot = 1_

- _save\_checkpoint slot1_
- _return_  
\*_if slot = 2_
- _save\_checkpoint slot2_
- _return_  
\*_if slot = 3_
- _save\_checkpoint slot3_
- _return_

_label load_  
_if (reload)_  
_choice_  
_selectable\_if (choice\_saved\_checkpoint\_slot1) #Slot 1: ${save\_name\_1}__restore\_checkpoint slot1_  
_selectable\_if (choice\_saved\_checkpoint\_slot2) #Slot 2: ${save\_name\_2}_  
_restore\_checkpoint slot2_  
_selectable\_if (choice\_saved\_checkpoint\_slot3) #Slot 3: ${save\_name\_3}_  
\*restore\_checkpoint slot3  
#Cancel  
_return  
else_  
You have yet to save your game.  
\*return

The problem is, when a player dies I give them these options. This comes up as an error using quicktest- that a choice must end in a \*goto to \*finish.

\*choice  
#Reload an earlier save.  
\*gosub\_scene savegame load  
#Restart.  
\*ending

I am sure I’m missing something very basic- I didn’t think I should put a \*goto under the \*gosub line for fear that this would mess with the location of the restore point. I have no idea how the \*restore\_checkpoint command operates.

Any ideas on what I should do?

Many thanks to you all!

_-sorry the formatting is a bit messed up, I didn’t know how it would show and put it all in italics to distinguish it- that’s why there’s all those excess asterisks all over the place 😮_

---

<div class="post-metadata">

**Author:** ![LiliArch](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/liliarch/32/120749_2.png) [@LiliArch](https://forum.choiceofgames.com/u/LiliArch)\
**Post date:** [April 22, 2024, 9:34pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/2 "2024-04-22T21:34:01Z")

</div>

Assuming your code works as intended when you playtest it, try using \*fake\_choice instead of the \*choice for the reload/restart thing that’s throwing the error?

---

<div class="post-metadata">

**Author:** ![NumberedEntity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/numberedentity/32/210906_2.png) [@NumberedEntity](https://forum.choiceofgames.com/u/NumberedEntity)\
**Post date:** [April 22, 2024, 9:41pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/3 "2024-04-22T21:41:34Z")

</div>

@LiliArch

Thanks for the reply. The code works when saving and restoring a game so far (as much as I have tested)- but it doesn’t when I use the restart or reload choice, after a player dies (so usually the choice would be for saving or reloading with no restart option).

I’ll give the \*fake\_choice a go tomorrow- (bit late for me to start a new mission right now) and post how it goes.

---

<div class="post-metadata">

**Author:** ![NumberedEntity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/numberedentity/32/210906_2.png) [@NumberedEntity](https://forum.choiceofgames.com/u/NumberedEntity)\
**Post date:** [April 23, 2024, 9:10am UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/4 "2024-04-23T09:10:57Z")

</div>

@LiliArch And anyone who can help!

Hmm…

When using fake\_choice a new problem appears and the code runs on to the choice below it (other ‘normal’ game choice).

I haven’t been the best with gosubs-

Could a solution be instead of this:

\*choice  
#Reload an earlier save.  
\*gosub\_scene savegame load  
#Restart.  
\*ending

I do this:

\*choice  
#Reload an earlier save.  
\*goto\_scene savegame load  
#Restart.  
\*ending

EDIT:

My question had evolved

If I formatted like this:

\*choice  
#Reload an earlier save.  
\*gosub\_scene savegame load  
\*goto younghub  
#Restart.  
\*ending

Then, if I choose the reload option, but cancel it, I will return to \*label younghub

But, if I choose a restore point (from \*gosub\_scene savegame load), will I also go to \*label younghub? Or does \*restore\_checkpoint ignore that bit?

---

<div class="post-metadata">

**Author:** ![NumberedEntity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/numberedentity/32/210906_2.png) [@NumberedEntity](https://forum.choiceofgames.com/u/NumberedEntity)\
**Post date:** [April 23, 2024, 12:08pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/5 "2024-04-23T12:08:29Z")

</div>

Okay, I have instead decided to use pre-named checkpoints. This seems more manageable.

This thread can be closed.

---

<div class="post-metadata">

**Author:** ![coal8](https://avatars.discourse-cdn.com/v4/letter/c/8491ac/32.png) [@coal8](https://forum.choiceofgames.com/u/coal8)\
**Post date:** [April 23, 2024, 12:31pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/6 "2024-04-23T12:31:35Z")

</div>

> [@NumberedEntity](#):
>
> And anyone who can help!

yeah this had me also thinking a bit and honestly pre-named checkpoints like you said might be for the best, on the plus side you have more control over what gets saved and loaded

---

<div class="post-metadata">

**Author:** ![NumberedEntity](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/numberedentity/32/210906_2.png) [@NumberedEntity](https://forum.choiceofgames.com/u/NumberedEntity)\
**Post date:** [April 23, 2024, 1:22pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/7 "2024-04-23T13:22:25Z")

</div>

@coal8

Yes, it just didn’t work out for me.

Making a game knowing that you’ll use the player-named checkpoints would be doable, but shoving it inside a game like mine, without neat chapters, seems very difficult.

What is helpful is that a player can still save over a pre-made checkpoint to keep the restore point up to date on their adventures. This seems a good fit for my game.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/choiceofgames/original/3X/e/f/efe1497a762edecdb6d569a1c4abee87508bf002.png) [@system](https://forum.choiceofgames.com/u/system)\
**Post date:** [April 24, 2024, 1:23pm UTC](https://forum.choiceofgames.com/t/problems-getting-the-new-checkpoint-system-to-restore-player-named-saves-could-i-use-goto-instead-of-gosub/152669/8 "2024-04-24T13:23:10Z")

</div>

Closed on April 24, 2024, 1:23pm UTC

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.
