What went wrong? (data not available when multiplying)

I created a small game that :

  1. read data from google sheet.
  2. get location from location sensor.
    but the problem I keep receiving this message where Everything is working so fine.
    and if press anywhere in mobile screen other than this pop up notification, the game will continue and run perfect.
  3. there is a calculation to calculate the distance between local and saved location.
    could someone advise.... ?

Is there any way to double check that app have values for the LOCATIOIN SENSOR and Data imported FROM GOOGLE SHEET before the calculation and multiplication between the mentioned ones?

have a good day

can you show to the relevant blocks used for calculation

Somewhere in your app you have a Math multiplication operation (x or * ) that is empty. Which one of your Blocks? No one knows because you did not share an image of your Blocks. The value isn't populating the Block and be caused for a lot of potential reasons.

Share your blocks or an aia and someone might be able to help. Initially look for a multiplication Math Block and the source of the value.. Also do a DoIt.


I will try to upload the block where it is so big... any way i have updated the article could you have look on it... thanks alot

Yes. Use If .. then .. else statements in an appropriate place in your code to only make the calculation if there is data. Programming Your App to Make Decisions explains how to use the If..then.

Check whether the latitude and longitude have values and only make your calculation when those values arrive. How? Show your relevant code Blocks.