First thing, don't call randomize after a wait action on start of layout. Move it to event 2 instead, as you have no way of knowing for certain if the Ajax request will complete in .0001 seconds or 10 seconds.
What is your default array size? From what I can see, your randomize loop will delete all your array x indexes after being run once. The second time, the loop will run for 0 to -1, since your array width will be 0 by then.
Thanks, it's x=5. now I understand, I'm deleting everything from the array, so if I want to refresh it with the same content, I will need to recreate that content first, right? Make a sub-function that repopulated the array?
That's not what I really want to do in any case. I will just move on to the next y row after the user has satisfied some requirement.