# How to compare with store variables

**URL:** <https://community.thunkable.com/t/how-to-compare-with-store-variables/351446>\
**Category:** Questions about Thunkable X\
**Created:** [December 4, 2019, 9:51pm UTC](https://community.thunkable.com/t/how-to-compare-with-store-variables/351446 "2019-12-04T21:51:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![farhadkubd1](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@farhadkubd1](https://community.thunkable.com/u/farhadkubd1)\
**Post date:** [December 4, 2019, 9:51pm UTC](https://community.thunkable.com/t/how-to-compare-with-store-variables/351446/1 "2019-12-04T21:51:14Z")

</div>

Hello, i am talking about a quiz app. In my app i have used only store variable. there are several types of quiz (quiz 1, quiz 2, such…). Only quiz 1 is initially enabled ( others are disabled) , for each correct answer my stored variable increases vale by 1. And if someone get 25 then quiz 2 will be enabled. so far this is working fine but the problem is when i am entering quiz 1 again it is erasing my previous stored value and quiz 2 being disabled if the score is under 25.

Now what i need to compare previous value with current value and keep the highest value between them. Any solution?

Thanks  
farhad

---

<div class="post-metadata">

**Author:** ![Dean\_Artis](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dean\_Artis](https://community.thunkable.com/u/Dean_Artis)\
**Post date:** [December 4, 2019, 10:18pm UTC](https://community.thunkable.com/t/how-to-compare-with-store-variables/351446/2 "2019-12-04T22:18:46Z")

</div>

Search the forum, this sort of thing has been answered many times.

---

<div class="post-metadata">

**Author:** ![CBVG](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cbvg/32/32401_2.png) [@CBVG](https://community.thunkable.com/u/CBVG)\
**Post date:** [December 4, 2019, 10:22pm UTC](https://community.thunkable.com/t/how-to-compare-with-store-variables/351446/3 "2019-12-04T22:22:01Z")

</div>

You need to store the score in non volatile memory.

Like so:

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

i.e. you specify “stored” instead of “app”.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/how-to-compare-with-store-variables/351446/4 "2024-11-08T11:46:30Z")

</div>


