I have this code which should generate numbers between 1 and 100:
int aux; aux = Game1.rand.Next(101); if (aux <= 20) { Trace.WriteLine(aux); seeker = true; }
The problem is i get values smaller than 20 every time. If i change 20 to 30 in the if statement, i always get numbers smaller or equal to 30. How can i overcome this isue? Thank you.