Hi
Is there a function to shuffle an array or is someone writing one to share please? I can't see anything in the documentation.
I've got an array of cards with about 20+ type variables applied to each iteration of the array.
I thought of creating a copy of the array using the same type i.e.
global dim cards[100] as card
global dim shuffledCards[100] as card
And then maybe pick a random one from cards with random(1, 100) to put in the first iteration of shuffledCards etc. and so on for the second, making sure that I'm not duplicating any cards but unfortunately you can't do a simple copy like this as it crashes:
shuffledCards[1] = cards[1]
This works but that would require 20+ lines for all of the type variables in card
shuffledCards[1].name = cards[1].name
shuffledCards[1].group = cards[1].group
Thanks in advance
the12thplaya