# The Name command

**URL:** <https://forum.choiceofgames.com/t/the-name-command/5980>\
**Category:** ChoiceScript Help\
**Created:** [November 21, 2014, 9:25pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980 "2014-11-21T21:25:07Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![MutonElite](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MutonElite](https://forum.choiceofgames.com/u/MutonElite)\
**Post date:** [November 21, 2014, 10:59pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/21 "2014-11-21T22:59:49Z")

</div>

You created gender as a boolean, change it to a string, instead of true it should be “”.

Edit: And the same is true for name.

---

<div class="post-metadata">

**Author:** ![MutonElite](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MutonElite](https://forum.choiceofgames.com/u/MutonElite)\
**Post date:** [November 21, 2014, 11:01pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/22 "2014-11-21T23:01:23Z")

</div>

Actually there is a reason, capitalization of variables is strongly discouraged. It’s easier to make logical mistakes otherwise.

The same is true for labels.

---

<div class="post-metadata">

**Author:** ![Pyromanci](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/pyromanci/32/2340_2.png) [@Pyromanci](https://forum.choiceofgames.com/u/Pyromanci)\
**Post date:** [November 21, 2014, 11:13pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/23 "2014-11-21T23:13:29Z")

</div>

I think you might be confusing variables with values. Capitals are avoided in values because string values are case sensitive. Variables themselves are not.

---

<div class="post-metadata">

**Author:** ![MutonElite](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MutonElite](https://forum.choiceofgames.com/u/MutonElite)\
**Post date:** [November 21, 2014, 11:21pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/24 "2014-11-21T23:21:18Z")

</div>

As I recall it, while variables aren’t case sensitive in CS, they are in javascript? I believe it had something to do with that, could be wrong though.

---

<div class="post-metadata">

**Author:** ![Pyromanci](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/pyromanci/32/2340_2.png) [@Pyromanci](https://forum.choiceofgames.com/u/Pyromanci)\
**Post date:** [November 21, 2014, 11:25pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/25 "2014-11-21T23:25:27Z")

</div>

I think I may have to go and look that up in a panic… The make your own games tutorial on the main site specifically says feel free to play as they are case insensitive. If it turns out that only holds true till you actually want to publish I might need to do some serious editing…

---

<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:** [November 21, 2014, 11:30pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/26 "2014-11-21T23:30:04Z")

</div>

> [@Aria\_senpai](#):
>
> \*input\_text name  
> \*set name “$!{name}”

Why’re you doing this? \*input\_text name should work fine. The second won’t work. It’s also a bit pointless since it’s telling the game to set a variable as itself.

If you do want to set a variable as another variable, say you have a nickname stat and someone says they don’t have a nickname so you just want it the same as their name it’s just

\*set nickname name

---

<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:** [November 21, 2014, 11:41pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/27 "2014-11-21T23:41:38Z")

</div>

> [@Aria\_senpai](#):
>
> The error message is this, startup line 99: Invalid expression, couldn’t extract another token: “Female”

The problem here is your curly inverted commas. You really need to use a text editor. You need to have " not “ ”

I would also suggest set it to female not Female.

If you’re on a PC I’d suggest Notepad++  
If you’re on a Mac use Textwrangler.  
If you’re on an Android I’m using DroidEdit there.

> [@Having trouble with variables?](https://forum.choiceofgames.com/t/having-trouble-with-variables/5649/9):
>
> TextWrangler is an OK free MAC alternative. @aetheria made a syntax highlighter for it: [ChoiceScript language module for TextWrangler](https://forum.choiceofgames.com/t/choicescript-language-module-for-textwrangler/994)

---

<div class="post-metadata">

**Author:** ![Pyromanci](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/pyromanci/32/2340_2.png) [@Pyromanci](https://forum.choiceofgames.com/u/Pyromanci)\
**Post date:** [November 21, 2014, 11:41pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/28 "2014-11-21T23:41:57Z")

</div>

\*input\_text name  
\*set name “$!{name}”

The second line tells it to replace name with the capitalized version of it’s self. It does work fine, although is only really useful for naming as far as I can see.

---

<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:** [November 21, 2014, 11:43pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/29 "2014-11-21T23:43:34Z")

</div>

Oh that’s awesome! I didn’t realise that. You learn someone new every day. If the name is capitalised does it leave things in place? I’m going to go add that to my tutorial since it’s a neat little trick.

---

<div class="post-metadata">

**Author:** ![Pyromanci](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/pyromanci/32/2340_2.png) [@Pyromanci](https://forum.choiceofgames.com/u/Pyromanci)\
**Post date:** [November 21, 2014, 11:44pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/30 "2014-11-21T23:44:44Z")

</div>

Yep, if it’s already a capital it actually does nothing. But it makes the stats screen look much better if they are automatically capitals.

---

<div class="post-metadata">

**Author:** ![Aria\_senpai](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/aria_senpai/32/2437_2.png) [@Aria\_senpai](https://forum.choiceofgames.com/u/Aria_senpai)\
**Post date:** [November 22, 2014, 5:09pm UTC](https://forum.choiceofgames.com/t/the-name-command/5980/31 "2014-11-22T17:09:48Z")

</div>

thanks guys, i fixed the problem. @FairyGodfeather was right i was doing " " instead “”. The program i was using also had a role in why it wasn’t working.

[Previous page](https://forum.choiceofgames.com/t/the-name-command/5980.md?page=1)
