Quote:
Originally Posted by Gunderak
PHP Code:
this.chosen = random(0, temp.trash.size());
Yet again im probably horribly wrong.
I was just thinking doing an array would make it look much nicer and be easier to add more items, rather than doing this.
PHP Code:
temp.chosen = random(1, 3);
if (temp.chosen == "1") {
...
}
|
The return value of
random is a float. The probability that it returns a particular value is (almost) zero. So try
int(
random(...)).