Maybe this snippet of my code will help you! But I do mine with Float but it’s almost the same!
ComenzarVotacion(Agent : ?agent):void=
Print("Comienza el calculo\nEmpezamos obteniendo los numeros aleatorios para cada jugador")
AllPlayers := GetPlayspace().GetPlayers()
for (EliminationGamePlayer : AllPlayers):
if (FortCharacter := EliminationGamePlayer.GetFortCharacter[]):
temp : float = GetRandomFloat(MinimoAleatorio, MaximoAleatorio)
set TemporalAleatorio += array:
temp
Print("Numero generado: {temp} \nPara:")