floor(random(3)+1)
Is an example from my .capx
Random returns a float value but putting floor(value+1) makes it so it rounds down to the nearest whole value.
Or you could try round(x) but I think both of those can only round to the nearest whole number and not any certain decimal place.