# Given name and surname display in stat screen

**URL:** <https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206>\
**Category:** ChoiceScript Help\
**Created:** [March 17, 2013, 12:48pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206 "2013-03-17T12:48:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![StanTheMan](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@StanTheMan](https://forum.choiceofgames.com/u/StanTheMan)\
**Post date:** [March 17, 2013, 12:48pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/1 "2013-03-17T12:48:23Z")

</div>

A little conundrum I’m not figuring out. I’ve got a game where the player will have a first and last name they will choose. I want this displayed on one line in the stats screen (like Name). Now, I can easily do this as two variables, and have them listed in the stat screen as First Last (and I know how to do it in the actual game text, so no need there).

How to do it in the stat screen? And how to set the variables properly in the mygame.js file? Checked through the files here and no one seems to have asked that as I can see…unless someone can point me towards it? Help!

---

<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:** [March 17, 2013, 12:56pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/2 "2013-03-17T12:56:27Z")

</div>

[http://choicescriptdev.wikia.com/wiki/Concatenation](http://choicescriptdev.wikia.com/wiki/Concatenation) any help?

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [March 17, 2013, 1:00pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/3 "2013-03-17T13:00:24Z")

</div>

Hey Stan, your choicescript\_stats file doesn’t have to start with \*stat\_chart - it can start with (for example) ${firstname} ${lastname}.

And to set the vars in mygame, you could have  
firstname: “Starting”  
,lastname: “Statistics”

which means “Starting Statistics” would show at the top of the stats screen until your reader has the chance to choose a name. 🙂

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [March 18, 2013, 7:06pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/4 "2013-03-18T19:06:24Z")

</div>

^ Havenstone (probably) has the best answer for you, and to elaborate, you might do something like this:

```

Your name is $!{firstname} $!{surname}. 
((^ The $! insures capitalization - very important when it comes to names.))
*stat_chart
  (Yay! Stats!)
  (More Stats!)

```

---

<div class="post-metadata">

**Author:** ![incrediblejonas](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/incrediblejonas/32/198630_2.png) [@incrediblejonas](https://forum.choiceofgames.com/u/incrediblejonas)\
**Post date:** [March 18, 2013, 7:34pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/5 "2013-03-18T19:34:03Z")

</div>

But make sure you set {firstname} and {surname} as something (such as ???) at the very beginning of your game, otherwise you will encounter an error if you try to access the stat screen at the very beginning.

---

<div class="post-metadata">

**Author:** ![aetheria](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@aetheria](https://forum.choiceofgames.com/u/aetheria)\
**Post date:** [March 19, 2013, 11:16am UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/6 "2013-03-19T11:16:00Z")

</div>

You can also initially set the variables for the first name and surname to “” (an empty string) so that before the player picks a name, no name displays on the stat screen at all. IMO that looks a little better than having “Unknown Unknown” or some other placeholder, but it’s a matter of taste. 🙂

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [March 20, 2013, 3:37am UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/7 "2013-03-20T03:37:33Z")

</div>

Another flavor to taste might be using a generic anonymous starting name pairing like…

John (or Jane) Doe  
John/Jane Smith  
or  
The Stranger

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [March 20, 2013, 4:19am UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/8 "2013-03-20T04:19:09Z")

</div>

@Caddmuss “J.” “Doe” is an effective gender neutral option when going that route. It’s arguably not as clean looking, but it gets the job done on that front.

---

<div class="post-metadata">

**Author:** ![StanTheMan](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@StanTheMan](https://forum.choiceofgames.com/u/StanTheMan)\
**Post date:** [March 25, 2013, 3:09pm UTC](https://forum.choiceofgames.com/t/given-name-and-surname-display-in-stat-screen/1206/9 "2013-03-25T15:09:22Z")

</div>

Folks, as always, thank you! I’ll fix that today as I’ve finished my first two chapters and on to the third. This one was driving me crazy!
