You must use 0 to 4. The value is added to the current material ID. So, the range goes from ID+0 to ID+4.
We use this method instead assigning directly a material ID, because it can be used to randomize groups of materials in a multi-sub (see the help reference).