# Variables not updating?

**URL:** <https://forum.code.org/t/variables-not-updating/38058>\
**Category:** Coding and Debugging Help\
**Created:** [May 4, 2023, 9:45pm UTC](https://forum.code.org/t/variables-not-updating/38058 "2023-05-04T21:45:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BunnieSmiles](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bunniesmiles/32/8142_2.png) [@BunnieSmiles](https://forum.code.org/u/BunnieSmiles)\
**Post date:** [May 4, 2023, 9:45pm UTC](https://forum.code.org/t/variables-not-updating/38058/1 "2023-05-04T21:45:24Z")

</div>

I’m trying to make a visual novel-type game, and to get the text to change I used a variable to count how many times the continue button was clicked to know which string of text to display, but for some reason, my variable won’t update after one click, I really don’t know how to fix it 😕

Here’s the project

> **[Check out what I made](https://studio.code.org/projects/applab/akDPoNtloFi0HaxRbddxT2xmjE_QSzqT4osYvtOiv8Q)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![edavis](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/edavis/32/4927_2.png) [@edavis](https://forum.code.org/u/edavis)\
**Post date:** [May 5, 2023, 1:58am UTC](https://forum.code.org/t/variables-not-updating/38058/2 "2023-05-05T01:58:25Z")

</div>

You were super close! Check out line 29 in your code. You had:  
**textCount = + 1**  
You just need to switch it up to:  
**textCount = textCount + 1**  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/c/cd52ce5240130670242cf306ad79bc2461afb388.png)

---

<div class="post-metadata">

**Author:** ![BunnieSmiles](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bunniesmiles/32/8142_2.png) [@BunnieSmiles](https://forum.code.org/u/BunnieSmiles)\
**Post date:** [May 5, 2023, 2:21am UTC](https://forum.code.org/t/variables-not-updating/38058/3 "2023-05-05T02:21:36Z")

</div>

Oh my gosh thank you!!! I knew I did something wrong there 😃
