# + and - button not working

**URL:** <https://community.thunkable.com/t/and-button-not-working/2106991>\
**Category:** Questions about Thunkable X\
**Created:** [October 31, 2022, 8:41pm UTC](https://community.thunkable.com/t/and-button-not-working/2106991 "2022-10-31T20:41:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prez523kthzh9](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@prez523kthzh9](https://community.thunkable.com/u/prez523kthzh9)\
**Post date:** [October 31, 2022, 8:41pm UTC](https://community.thunkable.com/t/and-button-not-working/2106991/1 "2022-10-31T20:41:36Z")

</div>

I have a plus and minus button to add and subtract from a saved variable.  
however when I click both nothing happens.

here is a screenshot

 ![Screenshot 2022-10-31 at 12.30.39 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/6/96291507c6d6b8e6a06879cd022585e5d911cb95.jpeg)

any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 31, 2022, 9:20pm UTC](https://community.thunkable.com/t/and-button-not-working/2106991/2 "2022-10-31T21:20:24Z")

</div>

You’ve set up the variables wrong. You used the `set app variable " "` block at the bottom of the Variables drawer when you should have used the `set app variable # of Herb Patches in cart’ block at the top of the Variables drawer.

The problem with your blocks is that you used a **variable block** as the name of the variable. It’s expecting a variable name as a **text string** but you gave it a variable that has a numeric value instead.

The simple fix here is to use the Change Variable By block. But for future reference, avoid the `set app variable " "` blocks.

Use the block here:

 ![Screen Shot 2022-10-31 at 2.21.46 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/7591536d13edaac5fcb3a8c95bb2cf1998401450.png)

Or this one:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/0/8015f3578a5a5ce284b5cc8a335411607dc42252.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 31, 2022, 9:22pm UTC](https://community.thunkable.com/t/and-button-not-working/2106991/3 "2022-10-31T21:22:56Z")

</div>

> [@tatiang](#):
>
> But for future reference, avoid the `set app variable " "` blocks.

Once you learn to harness these variables you’ll like them. I’d stay away for now and learn to use the others instead like @tatiang suggests.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [January 29, 2023, 9:23pm UTC](https://community.thunkable.com/t/and-button-not-working/2106991/4 "2023-01-29T21:23:21Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
