# Username for game

**URL:** <https://forum.makecode.com/t/username-for-game/28193>\
**Category:** Help\
**Created:** [April 11, 2024, 4:51pm UTC](https://forum.makecode.com/t/username-for-game/28193 "2024-04-11T16:51:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lilvince](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@Lilvince](https://forum.makecode.com/u/Lilvince)\
**Post date:** [April 11, 2024, 4:51pm UTC](https://forum.makecode.com/t/username-for-game/28193/1 "2024-04-11T16:51:00Z")

</div>

How would I make it so that when the player starts the game they get asked for a name and how would I make that name get used every time the player gets adressed?

---

<div class="post-metadata">

**Author:** ![Bifrosty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bifrosty/32/24819_2.png) [@Bifrosty](https://forum.makecode.com/u/Bifrosty)\
**Post date:** [April 11, 2024, 9:38pm UTC](https://forum.makecode.com/t/username-for-game/28193/2 "2024-04-11T21:38:22Z")

</div>

Hello, this is pretty simple to do and can be completed within a few steps.

1.Firstly create a new varibles titled “playerName”

2.Set the variable to an “ask for string” Input found in the purple game drawer. Make sure to get “ask for string” and not “ask for number”

3.You are pretty much done! You can call upon the variable in any text compatible format.

If you need an example, I made one —\> [https://arcade.makecode.com/S88183-50709-65077-13647](https://arcade.makecode.com/S88183-50709-65077-13647)  
Click on the “Edit code” button in the top left corner to see the code. Ask me if you have any question about the example or need and further guidance.

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [April 11, 2024, 11:58pm UTC](https://forum.makecode.com/t/username-for-game/28193/3 "2024-04-11T23:58:20Z")

</div>

Btw if you want the data to save use the settings extension instead of a variable

---

<div class="post-metadata">

**Author:** ![Lilvince](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@Lilvince](https://forum.makecode.com/u/Lilvince)\
**Post date:** [April 12, 2024, 3:22pm UTC](https://forum.makecode.com/t/username-for-game/28193/4 "2024-04-12T15:22:26Z")

</div>

thanks, man/miss (sorry, don’t want to assume gender since everyone here is so nice) i’ll tell you if I have any issues or if you want to help me with the game you can always email me at [vincentturdhead2010@gmail.com](mailto:vincentturdhead2010@gmail.com) (it’s an old email and I never bothered changing it)

---

<div class="post-metadata">

**Author:** ![Lilvince](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@Lilvince](https://forum.makecode.com/u/Lilvince)\
**Post date:** [April 12, 2024, 3:24pm UTC](https://forum.makecode.com/t/username-for-game/28193/5 "2024-04-12T15:24:53Z")

</div>

welp… the project just got corrupted so ain’t that just grand

---

<div class="post-metadata">

**Author:** ![Mekun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mekun/32/25052_2.png) [@Mekun](https://forum.makecode.com/u/Mekun)\
**Post date:** [November 7, 2025, 6:44pm UTC](https://forum.makecode.com/t/username-for-game/28193/6 "2025-11-07T18:44:34Z")

</div>

can you tell me how to use it?

---

<div class="post-metadata">

**Author:** ![Bifrosty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bifrosty/32/24819_2.png) [@Bifrosty](https://forum.makecode.com/u/Bifrosty)\
**Post date:** [November 7, 2025, 7:27pm UTC](https://forum.makecode.com/t/username-for-game/28193/7 "2025-11-07T19:27:29Z")

</div>

Sure, once you have stored the name in a variable like this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/d/5/d593974fed0cd7e59819e3d6e8b3e347e386edd3.png)  
You can call upon that variable anytime you want to use it.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/5/65ed511fa156e90fe2e5c2f57b46f831b289085d.png)  
Ensure you are only using inserting the variable in places where a “\*string” goes, otherwise an error will be caused. This also works for numbers! Instead of using ask for string use ask for number. When using a number ensure you are only putting it in places where a number goes, if you want a string that says the number than you can use the “convert to text block” in the text drawer.

\*String is the word for a variable that stores text
