1 2 3 4 5 6 7 8 9 10 11 | deletearray .Random[0]; for(set .@i, 0; .@i < 4; set .@i, .@i + 1) { setarray .Random[.@i], rand(4); //Insert random number for every array element (4 elements) for(set .@j, 0; .@j < 4; set .@i, .@i + 1) { //Check if there is a duplicate if(.Random[.@j] == .@i) { //Found a duplicate setarray .Random[.@i], rand(4); //Re-generate } } debugmes .Random[.@i]; } end; |