24.01.2010, 13:37
Quote:
Originally Posted by mansonh
random returns a float, in your case between 0 an 1.
However you are turning it into an int which means you will always get 0. So you need to do new rand = floatround(random(sizeof(TEAMS)), floatround_floor); You use floatround_floor because sizeof(teams) will be 2, and you want 0 or 1. |