Problem: comparsion between two numbers with tolerance +/- 2 %

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have to make a comparison between two numbers, but with a tolerance eg:

    I have a value of 200 in a string

    I must have an active object that, when the x value compared to the value of 200 is the highest 2% or more lower than 2%, the banner is green, otherwise (else) turns red

    the value 200 is a dynamic value read from a hardware device that goes from 0 to 250 (the elettrcia mains voltage)

    inside an edit box I have to put the value that I read with the tester into an electrical socket
    If the tester read 232 volts, I enter this value in the 'edit box.
    if the voltage read from my hardware unit is next to that +/- 2% it means that the system is calibrated ok and a graphic banner changes state.
    You can help me?

    My Professional Software House Automation realized with MMF2.5 dev
    Please login to see this link.

  • You can check whether abs(B-A) is lower than the tolerance threshold.
    You can potentially see the percentage difference between two numbers using 100.0*((B - A) / A) or something like that but you'll need to multiply each value by 1.0 to make it floating point.

    .:::.Joshtek.:::.

    Visit Please login to see this link. to publish your freeware Click games and play games made by others or check out Please login to see this link. to enjoy or contribute to our archive of over 3,200 older Click games.

  • Hello daniele,

    I made an example, I don't know if it's what you need. Take a look, please. I think that you can use Immediate If Object for only need a single event.

    Please login to see this attachment.

    Tap And Go! released on Google Play Please login to see this link.

  • thank you :)
    I have solved with a more simple system, but it is not very effective.
    Your method is much more functional even higher than those shown.
    Thanks so much

    My Professional Software House Automation realized with MMF2.5 dev
    Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!