rLen = (random(6)); // random number 0->5
if (rLen == 0 || 1 || 2 ){ // if equal to 0, 1 or 2
nZone = 17; // nZone = 17, if == 0, 1 or 2
}
else if (rLen == 3 || 4){ // if equal to 3 or 4
nZone = 16; // nZone = 16, if == 3 or 4
}
else {
nZone = 15; // nZone = 15, if == 5 (or none of the above)
{
I've got round by using
rLen = (random(6));
if (rLen < 3 ){
nZone = 17;
}
else if (rLen <5){
nZone = 16;
}
else {
nZone - 15;
{
Which is fine for this appilcation. But thought it should have worked.
Thanks for looking.