# First & Last Names?

**URL:** <https://forum.choiceofgames.com/t/first-last-names/1342>\
**Category:** ChoiceScript Help\
**Created:** [May 11, 2013, 9:57am UTC](https://forum.choiceofgames.com/t/first-last-names/1342 "2013-05-11T09:57:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Random](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/random/32/2224_2.png) [@Random](https://forum.choiceofgames.com/u/Random)\
**Post date:** [May 11, 2013, 9:57am UTC](https://forum.choiceofgames.com/t/first-last-names/1342/1 "2013-05-11T09:57:34Z")

</div>

Oh hi. Nice to meet everyone here.

Getting right to it, I’m having some trouble placing the character’s first and last name in the coding, and yes, granted, there has been a thread about this before, but since this problem persists and I’ve found no such solution so far, I thought I should make a new thread… I’ve tried, specifically:

\*create firstname “”  
\*create lastname “”

But it tells me that it won’t work, and that no such variables exist. I’m not sure what to change it into, as well as what to place in the stat chart. I’ve gotten far enough with just putting in:

Name: $!{name}

But I’m not sure if that can work with the lastname variable, if there is one, either. Plus, I’ve seen the other, recent thread with all that coding supposedly to be placed in the stat chart, but at that point, I get confused and I did try it out, but I think I did it, er, wrong.

Help, please? Thank you.

---

<div class="post-metadata">

**Author:** ![Redgrave](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/redgrave/32/619_2.png) [@Redgrave](https://forum.choiceofgames.com/u/Redgrave)\
**Post date:** [May 11, 2013, 1:14pm UTC](https://forum.choiceofgames.com/t/first-last-names/1342/2 "2013-05-11T13:14:23Z")

</div>

Just a stab in the dark, but would this work:  
\*create firstname " "  
\*create lastname " "  
\*create name " "  
\*set name firstname&" "&lastname

I’m not sure, however!

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [May 11, 2013, 1:35pm UTC](https://forum.choiceofgames.com/t/first-last-names/1342/3 "2013-05-11T13:35:08Z")

</div>

You need to put \*create in the file startup.txt not the actual stats chart. choicescript stats is what appears when you click the show stats button in your game.

---

<div class="post-metadata">

**Author:** ![Random](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/random/32/2224_2.png) [@Random](https://forum.choiceofgames.com/u/Random)\
**Post date:** [May 11, 2013, 8:39pm UTC](https://forum.choiceofgames.com/t/first-last-names/1342/4 "2013-05-11T20:39:25Z")

</div>

Well, I did place the \*create firstname “” & \*create lastname “” in the startup text and it still said it didn’t work, however, I did not try putting the \*create name"" after that. I’ll try it out now.

Okay, well… I tried it, and it works! So thank you! 😃

However, now I have another problem.

I’ve been using CoD as a reference to my coding, and to make sure that everything is right, and with the input name thing, I’ve done the capitalization check, which is as follows:  
#None of these.  
What is your name?  
\*input\_text firstname  
\*if ("${firstname}" != “$!{firstname}”)  
\*goto last\_name

Note that the \*input\_text firstname and the \*if line has the same indent spaces.

However, now it says that the it “expected at least one line in ‘if’ true block”, and then the next page is blank, and I’m not sure what it means. However, if I pick one of the default names, it goes on as per normal.

Help again please? Thank you once more, sorry to be asking so many questions.

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [May 11, 2013, 9:08pm UTC](https://forum.choiceofgames.com/t/first-last-names/1342/5 "2013-05-11T21:08:17Z")

</div>

@Random

I think you are making things more complicated than they need to be.

```

#None of these.
  *goto custom_name

*label custom_name
What is your first name...
*input_text firstname
...and your surname?
*input_text lastname
So you are $!{firstname} $!{lastname}.

```

---

<div class="post-metadata">

**Author:** ![2Ton](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/2ton/32/786_2.png) [@2Ton](https://forum.choiceofgames.com/u/2Ton)\
**Post date:** [May 11, 2013, 9:12pm UTC](https://forum.choiceofgames.com/t/first-last-names/1342/6 "2013-05-11T21:12:45Z")

</div>

```

*create firstname
*create lastname
*create name
#None of these.
  What is your firstname?
  *input_text firstname
  What is your lastname?
  *input_text lastname
  *set name "$!{firstname} $!{lastname}"

```

I think I got it?

@Nocturnal_Stillness Damn you beat me!

---

<div class="post-metadata">

**Author:** ![Random](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/random/32/2224_2.png) [@Random](https://forum.choiceofgames.com/u/Random)\
**Post date:** [May 11, 2013, 11:25pm UTC](https://forum.choiceofgames.com/t/first-last-names/1342/7 "2013-05-11T23:25:39Z")

</div>

Ah… Alright then, sorry for making things so complicated, I’m just a bit confused xD

Thank you~

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [May 12, 2013, 5:58am UTC](https://forum.choiceofgames.com/t/first-last-names/1342/8 "2013-05-12T05:58:15Z")

</div>

@Random

It’s okay its how we learn.

---

<div class="post-metadata">

**Author:** ![Redgrave](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/redgrave/32/619_2.png) [@Redgrave](https://forum.choiceofgames.com/u/Redgrave)\
**Post date:** [May 12, 2013, 7:31am UTC](https://forum.choiceofgames.com/t/first-last-names/1342/9 "2013-05-12T07:31:05Z")

</div>

@2Ton now, when using the \*create command, you have to specify a starting value:

```

*create variable

```

This will not work as no value has been specified

```

*create variable 50

```

This will work as the value has been specified

Unless you haven’t updated to the latest version of choicescript, in which case old commands will still work- although to get your game published it has to be compatible with the newest versions, I believe 🙂
