# Struggling with Name Input

**URL:** <https://forum.choiceofgames.com/t/struggling-with-name-input/62885>\
**Category:** ChoiceScript Help\
**Created:** [August 21, 2019, 5:01am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885 "2019-08-21T05:01:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 5:01am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/1 "2019-08-21T05:01:35Z")

</div>

Hello! I’m starting a new game, but I’m having quite a few issues with getting the variables for the name input to work. ![image](https://global.discourse-cdn.com/choiceofgames/original/3X/6/7/67ed5c003bc361430980a5ee94959998be0ca125.png)  
 ![image](https://global.discourse-cdn.com/choiceofgames/original/3X/c/2/c2e3d86871aa692e5ed05ce2ac2521116c3dd102.png)

![image](https://global.discourse-cdn.com/choiceofgames/original/3X/c/1/c129653aab00bcd6346a952194d5e533fd1b9a30.png)

Could someone help?

---

<div class="post-metadata">

**Author:** ![poison\_mara](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/poison_mara/32/271676_2.png) [@poison\_mara](https://forum.choiceofgames.com/u/poison_mara)\
**Post date:** [August 21, 2019, 5:12am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/2 "2019-08-21T05:12:20Z")

</div>

The problem is in Choice stats not in you input of names .Put it out of stat chart and simply

```
Name ${fname} ${lname}

```

---

<div class="post-metadata">

**Author:** ![Kaelyn](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/kaelyn/32/141616_2.png) [@Kaelyn](https://forum.choiceofgames.com/u/Kaelyn)\
**Post date:** [August 21, 2019, 5:14am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/3 "2019-08-21T05:14:41Z")

</div>

If it shows nothing in the Status-Screen it is, cause you wrote the variables wrong, you named them sname and fname, so you should call them that and Not “Fname” and “Sname” in stat screen.

May I ask why you used the if command, are there several times you ask for the name? Otherwise just the input would be enough

---

<div class="post-metadata">

**Author:** ![anon8836198](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@anon8836198](https://forum.choiceofgames.com/u/anon8836198)\
**Post date:** [August 21, 2019, 7:40am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/4 "2019-08-21T07:40:19Z")

</div>

Worth mentioning: for conditionals to work, the directly following executed line should be denoted by indentation.

```
*if (something)
	doThis

```

The way \*ifs are structured in your example

```
*if (something)
doThis

```

won’t be picked up by CS.

---

<div class="post-metadata">

**Author:** ![will](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/will/32/132033_2.png) [@will](https://forum.choiceofgames.com/u/will)\
**Post date:** [August 21, 2019, 8:01am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/5 "2019-08-21T08:01:15Z")

</div>

You forgot to put the dollar signs ($) so the game is translating whatever name you put in as a new variable rather than as a string to be reported.

Also keep your indents consistent omg

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:12am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/6 "2019-08-21T08:12:04Z")

</div>

I read another post on here that suggested the If commands since I was at a loss on what to do, thank you so much for answering, though.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:12am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/7 "2019-08-21T08:12:27Z")

</div>

Thanks, gonna try this out as well as other response.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:12am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/8 "2019-08-21T08:12:31Z")

</div>

I am also going to attempt your fix the moment I can, really want to get on with the story.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:12am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/9 "2019-08-21T08:12:43Z")

</div>

Okay, it well, opens now, that’s a start.

 ![image](https://global.discourse-cdn.com/choiceofgames/original/3X/c/c/cc5f32dc9ebdfc3c9c3f7d7de58738fa774b41bc.png)

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:12am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/10 "2019-08-21T08:12:48Z")

</div>

![image](https://global.discourse-cdn.com/choiceofgames/original/3X/7/8/78b7f9a37884f7fb4c30ed4e23c4979929ded3a9.png)

That didn’t work either, keep getting told there’s no Variable for the name I apply (For simplicity’s sake, it was Jake.)

---

<div class="post-metadata">

**Author:** ![poison\_mara](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/poison_mara/32/271676_2.png) [@poison\_mara](https://forum.choiceofgames.com/u/poison_mara)\
**Post date:** [August 21, 2019, 8:19am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/11 "2019-08-21T08:19:35Z")

</div>

I will put one of my games stats here you can check out as this is weird.

```
${name} ${surname} personal data

[b]Biography[/b]
You are a ${boy} from ${region} You have been destined to ${class} class. For now your life is a blank page. 

[b]Physical appearance[/b]

Body built: ${built}

Eye color ${eyes}

Hair color ${hair}

[b]Skills[/b]
*stat_chart
  percent martial Martial knowledge
  percent haggle Haggle
  percent tech Technology
  opposed_pair energy 
    Wisdom seeker
    Power seeker
  percent charisma Charisma
  percent intelligence Intelligence

```

All ${} were introduced via input and work well.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:27am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/12 "2019-08-21T08:27:00Z")

</div>

I added $, didn’t work either, sadly.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:45am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/13 "2019-08-21T08:45:22Z")

</div>

> [@poison\_mara](#):
>
> ${name} ${surname}

I have that written on my data, but it doesn’t show the inputted name, sadly.

---

<div class="post-metadata">

**Author:** ![anon8836198](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@anon8836198](https://forum.choiceofgames.com/u/anon8836198)\
**Post date:** [August 21, 2019, 8:46am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/14 "2019-08-21T08:46:03Z")

</div>

@HeadUnderwater I recommend you read up on a tutorial kindly put together on a choicescript wiki:

> **[A Basic Tutorial](https://choicescriptdev.fandom.com/wiki/A_Basic_Tutorial)**
>
> Welcome to A Basic Tutorial, and indeed, to the wonderful (if sometimes wacky!) world of ChoiceScript Game Development. There are a number of basics concepts that are necessary to understand in learning, using and discussing ChoiceScript, and this...

It explains the basics of how and why things work in CS really well.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:48am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/15 "2019-08-21T08:48:25Z")

</div>

Thank you, I quickly did a read over on the subjects I needed, but I couldn’t find the part to explain how to use an inputted name. There was a stat page, but it did not explain how to use the inputted name.

---

<div class="post-metadata">

**Author:** ![anon8836198](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@anon8836198](https://forum.choiceofgames.com/u/anon8836198)\
**Post date:** [August 21, 2019, 8:50am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/16 "2019-08-21T08:50:04Z")

</div>

In data types:

> **[Data types](https://choicescriptdev.fandom.com/wiki/Data_types)**
>
> This article is aimed at beginners to ChoiceScript. However, if you have not already done so then the best place to start would be with the very first article in this Introduction To ChoiceScript Game Development series of linked articles: A Basic...

  
Look up “String variables” section.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:50am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/17 "2019-08-21T08:50:09Z")

</div>

![image](https://global.discourse-cdn.com/choiceofgames/original/3X/2/2/22c1c9caed14b5ad10a53047b39b00e0740dbd6f.png)

And for my startup.

![image](https://global.discourse-cdn.com/choiceofgames/original/3X/e/c/ec434e76dd7a3bf56740a74f2ca5fb1b3625149d.png)

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:56am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/18 "2019-08-21T08:56:55Z")

</div>

Took a longer look at the article and tried the \*Set var command, didn’t do anything to help me.

---

<div class="post-metadata">

**Author:** ![poison\_mara](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/poison_mara/32/271676_2.png) [@poison\_mara](https://forum.choiceofgames.com/u/poison_mara)\
**Post date:** [August 21, 2019, 8:58am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/19 "2019-08-21T08:58:13Z")

</div>

I put your variable and put input command and worked on quick text. No idea won’t work for you.

---

<div class="post-metadata">

**Author:** ![HeadUnderwater](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/headunderwater/32/98187_2.png) [@HeadUnderwater](https://forum.choiceofgames.com/u/HeadUnderwater)\
**Post date:** [August 21, 2019, 8:59am UTC](https://forum.choiceofgames.com/t/struggling-with-name-input/62885/20 "2019-08-21T08:59:13Z")

</div>

It’s frustrating as it’s right at the start, I have another bug I could be working on instead of something that should be working.

[Next page](https://forum.choiceofgames.com/t/struggling-with-name-input/62885.md?page=2)
