Slow/duplicate random number generation

If I generate a random number when a screen starts, it seems to generate one number first and then immediately generate a second number.

You can see this in the simple project I created:

If you tap the button, you don’t see the effect but if you start the screen, it slowly generates two numbers instead of one.

In the video, I open Thunkable Live with 90 showing. As the screen “starts,” it generates a random number but displays 49 and then 80. I then tap the button to generate the next random number and it displays 71.

Was this just an issue with live testing @tatiang?

I wonder if you had duplicate event handlers here somewhere?

@domhnallohanlon This is the project:

It doesn’t seem to be doing the duplicate number generation any more. I changed the display so it adds the next number onto the label’s text string.

1 Like

Thanks @tatiang, Just looking at your example now, it’s behaving differently to the example in your video. I’m seeing a strong of random numbers, and a new number is added to the end each time the button is pressed.

Is everything working ok for you now?

Yes, it seems to be working fine. Thanks.

yes it is an error i think just try canvas in this if you want