How to fix stored variable when clicked showing NaN

I made a label named point count and also a button named ad1 i want that when i click on ad1 it should count point but when i click on it shows NaN. and i am using stored variable so that i can store value even if i close and restart the application. If i use app variable things are working but it is not storing value when i press back it just reset point count. how can i fix this thing.

new
Screenshot 2023-05-29 093906

When you use stored variables, you have to give them a starting value. The way you do this is to put an if block in the when screen opens block.

If variable = null
Set variable to 0

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