I want to make a ATM project but face some problems.

When I type 1 and keep clicking on the Deposit Button, it should be 1,2,3… But the result is 1,3,7,15… Where did the problem come from?

This is my codes:

Do you know how to solve the problem?

I want to make a ATM project but face some problems.

When I type 1 and keep clicking on the Deposit Button, it should be 1,2,3… But the result is 1,3,7,15… Where did the problem come from?

This is my codes:

Do you know how to solve the problem?

The problem is that you are using a “change by” block when you should be using a “set” block.

“Change by” means add this to the existing amount. So you are adding 1+1 to 1 to get 3. Then adding 3+1 to 3 to get 7, etc.

Another option is to change by only app variable deposit.

2 Likes

I have changed the codes but there is still the problems:

the answer should be 1,2,3……but it shows 1,3,5……

I was confused about it.（；´д｀）ゞ

It so strange that everything is right now but I even didn’t change any codes. The result is 1,2,3……while it was wrong just 10 minutes ago.

If you are testing on a device, the Thunkable Live app doesn’t always show the current version of the project. If you are testing a web preview, then I can’t explain why it wouldn’t have worked the first time.

OK,thanks for your sincerely help(●’◡’●)