# Save system error

**URL:** <https://forum.choiceofgames.com/t/save-system-error/19608>\
**Category:** ChoiceScript Help\
**Created:** [August 6, 2016, 9:27am UTC](https://forum.choiceofgames.com/t/save-system-error/19608 "2016-08-06T09:27:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 6, 2016, 9:27am UTC](https://forum.choiceofgames.com/t/save-system-error/19608/1 "2016-08-06T09:27:06Z")

</div>

Hey,  
Im using [this](https://forum.choiceofgames.com/t/save-game-progress-feature/381) saving mechansim, and it works just fine when saving the game, but fails when loading saved progess.  
I get this error message:

savegame line 10: invalid expression at char 25, expacted OPERATOR, was: VAR [sgender\_text]

This is the savegame.txt:

```
`*if save_flag = 1
  *set sname name
  *set sgender_text gender_text
  *set sgender gender
  *set soccupition_text occupition_text
  *goto endsaveloadgame

*if save_flag = 2
  *set name sname
  *set set gender_text sgender_text
  *set gender sgender
  *set occupition_text soccupition_text
  *goto endsaveloadgame

*label endsaveloadgame
*page_break

*if save_flag = 1
  *set save_flag 0
  PROGRESS SAVED
  *line_break
  Should you die during the next Chapter you will have the option of trying again
  from this exact point, or to replay the game from the very beginning.
  *line_break
  Please note that this option applies only to this session. After quitting the game,
  the next time you play will be from the very beginning.
  *if scene_number = 0
   *page_break
   *goto_scene startup
  *if scene_number = 1
   *page_break
   *goto_scene kneedeep

*if save_flag = 2
  *set save_flag 0
  GAME RESET - START OF CURRENT CHAPTER

  Are you ready to resume from the beginning of 
  *if scene_number = 0
    Chapter One?
  *if scene_number = 1
    Chapter Two?
  *if scene_number = 3
    Chapter Three?`

```

and this is the relevant startup.txt section:

```
*create Name ""
*create Gender_text "Unknown"
*create gender 0
*create occupition_text "Unknown"
*create occupition 0
*create Cunning 50
*create Emotion 50
*create Violence 50
*create Rationality 50
*create Health 0
*create Hunger 0
*create Thirst 0
*create Fatigue 0
*create Strength 5
*create Dexterity 5
*create Charisma 5
*create Perception 5
*create Endurance 5
*create Willpower 5
*create sanity 100
*create food 0
*create water 0
*create heshe ""
*create himher ""
*create hisher ""
*create manwoman ""
*create body_count 0
*create save_flag 0
*create scene_number 0

*create sname ""
*create sgender_text "Unknown"
*create sgender 0
*create soccupition_text "Unknown"
*create soccupition 0
*create scunning 50
*create sviolence 50
*create srationality 50
*create semotion 50

```

What’s the problem? Thanks!

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [August 6, 2016, 9:30am UTC](https://forum.choiceofgames.com/t/save-system-error/19608/2 "2016-08-06T09:30:55Z")

</div>

> [@Yuvalbab](#):
>
> \*set set gender\_text sgender\_text

You have _\*set set_ in there.

---

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 7, 2016, 4:07pm UTC](https://forum.choiceofgames.com/t/save-system-error/19608/3 "2016-08-07T16:07:44Z")

</div>

i’ll do it, thanks… what’s set set exactly? Iv’e never encountered it before

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [August 7, 2016, 5:33pm UTC](https://forum.choiceofgames.com/t/save-system-error/19608/4 "2016-08-07T17:33:11Z")

</div>

It looks like a typo on your behalf.

With

\*set set gender\_text sgender\_text

You’re setting a variable called “set” to the value of gender\_text sgender\_text which I’m guessing you don’t actually mean to do?

---

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 12, 2016, 7:02pm UTC](https://forum.choiceofgames.com/t/save-system-error/19608/5 "2016-08-12T19:02:45Z")

</div>

Oh silly me  
I thought you told me to do it “set set”  
thanks
