A checkbox text problem

Hi,

For your information, I am currently working on a game, and I am on a part where it generates a specific range of numbers which are randomly put in 9 checkboxes accordingly. After each number is chosen to put in a checkbox, they should be removed from the list to avoid any numbers repeating.

Here is where the problem starts. I don't see any numbers in any of the checkboxes' texts. I was thinking if the numbers weren't being put in a list (Global PrimeNumbers) quick enough (there was a screen change), leading to blank texts. But I already gave it enough time (10 seconds using clock 2) to load everything and I could even see the list constructed and 9 numbers being removed, so it shouldn't be about load time.
If the numbers are removed, it indicates that random numbers ARE picked from the list. And if they're picked from the list, the checkbox texts should have numbers.

Here is what I think the problem could be. 1. Because there was a warning about "cannot pick random elements from an empty list" or something, there could be something wrong in Initialize Global PrimeNumbers, mostly likely the "create empty list" part. 2. Maybe be I couldn't use Global CheckBox to make a list of the texts so it doesn't recognize the texts as "items"? Which doesn't make much senses. 3. It could simple be a glitch. 4. I got something else messed up which turned out to some careless mistakes.

I tried many different ways but none of them worked. I'd much appreciate if someone could understand and help, thanks! (P.S. Sorry for the bad English!)
-Alvis

You have several issues.....

Try like this: (no need for any timers)

image

Got this.

You need to show your relevant blocks

Modified (Didn't use a button but it would still be ok, wouldn't it?

Nevermind, this works. Turns out I shouldn't separate the code into 2 procedures. Still don't how the original setup didn't work, but who cares.
Thanks! TIMAI2

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