ok i am having a little trouble generating random numbers betwen a range. i want the number to be between 40 and SCREEN_X-40 and also be a factor of 20. I had it working, but i somehow screwed it up and saved over it and cant get it working.
this is what i have, but it is not doing #'s in the rt range
x = 20*((rand() % ((SCREEN_W-40)/20) +2 ));