Math blocks returning NaN/0

Hi Thunkers, Greetings !
https://x.thunkable.com/projects/66b59125785e021d51b13fd0/03306f68-8703-4721-a050-85d71aac2d29/blocks
Here is my project link. I am facing issue in the currency converter. The last block of math is having issue, tried everything as told in other posts in the community but it still sends NaN or 0 pls help

Itโ€™s a complicated set of blocks. What have you done to debug it and make sure each value you are using in your formula has the value you expect?

I recommend using the method from the โ€œDebugging a Projectโ€ link below.

ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท
Need help? How to Ask Great Questions :sparkles: Debugging A Project :sparkles: API JSON Tutorial

Want to hire a Certified Thunkable Expert? Elevate your app with Tatiang on Fiverr

Thanks @tatiang for your json tutorial, it did help me in my other part of the same app. For my original question, the values from json are correctly fetched, I have made sure the values are proper by displaying them one by one on the label, last calculation after the math block is coming to be 0. The blocks are as below

If I use the same label to display a simple addition it displays that correctly. Would it be possible to guide where is the mistake. TIA

The problem is here:

Use the set block at the top of the variable drawer instead. What youโ€™d done is to try to set an app variable with the name [value of app variable answer]. That wonโ€™t work.

Thanks Tatiang. It finally works now, reduced the code and applied the blocks like this.

1 Like

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