Urgent error fix needed: Project due yesterday, how do I fix this error

So basically I was trying to make a savings goal tracker for my school project. I was following a tutorial (can't find it now for some reason), and when I connected it to my phone, quite a bit of errors happened?

This is my code:


Screenshot 2026-03-08 083619




And these are my errors:



I asked my friend, and she said this doesn't usually happen? Anyways urgent help needed!

  1. First, fix the errors in your blocks.

  2. Post blocks of good quality.

  3. Debug your blocks (right-click on a block, select "Do it," and post the result).

When you click add target the global value was reset to empty. So it thorws such error that +1 cannot be add with an empty targetvalue variable

I fixed my errors and changed a few things while trying to work it out.





Still has the same errors

I removed set target_number.text to 0, so that it would not reset, but its still same errors.

you are trying to perform DAYS minus DATE. you should convert start_date to DAYS also using call clock1 with pattern "D" to make them the same units

it looks like you're trying to get the number of dates between 2 dates. this is the proper block to use then. you supply starting and ending date and you get days.

the call results in milliseconds - so divide by 1000 * 60 * 60 * 24 = 86,400,000 milliseconds per day

(the pervious version works only if all events occur within the same year)

1 Like

Elaborate when do you get this error,

During scteen init or when any specific button is clicked

I get the following error when Update_Status is clicked:


I get this error when Reset _Button is clicked:


I know what causes this error but I do not know what to replace it with.

regarding the error you get when you click update_status, it calls 'calculate_status' and that procedure is doing invalid math - see my reply to your earlier post.

for the reset button error, you are getting them because you are setting text fields to numeric eg. set currentvalue.text to 0
change it to set currenttvalue.text to "0"
there are several of them

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia