Page 1 of 1

Newbie Question on integers

PostPosted: Thu Apr 29, 2004 4:44 pm
by Just4Fun
When I do this:

int iRandomInteger
iRandomInteger=49
Lotto.textNumber=(rand(iRandomInteger)+1)

I get a random float number (ie 28.549140) instead of an integer result.
What am doing wrong? TIA

Re: Newbie Question on integers

PostPosted: Sat Jan 17, 2009 10:27 pm
by BloodRedDragon
you may need to get rid of the rand as it may be a random decimal. Or you may have to multiply, as what you have done in the script is divided the rand by the integer.

Re: Newbie Question on integers

PostPosted: Sun Jan 18, 2009 12:01 pm
by Fuzzy
And what you've done is answer a five year old question!

:)