switch(getrandom(1, 3)) {
case 1:
function1(%blah);
case 2:
function2(%blah);
case 3:
function3(%blah);
}
Why did you put breaks in there, phflack? You also forgot spaces in the case areas and such. Not that you aren't smart, but keep that in mind. :)
oops about the spaces, but the break; is needed i thought, at least in C++, as it would then continue to the next statements
i figured it was the same, so i added them in my script with the same style, and it worked, so i figured it was the same
I was hoping on making some more common than the other.
function Function()
{
if(getRandom(1,10) >= 7)
{
Common()
}
if(getRandom(1,10) <= 8)
{
LessCommon()
}
if(getRandom(1,10) == 10)
{
BarelyCommon()
}
}
But that would call multiple. How would I make it so after one returned true it stopped there?
you're getting a new random number each time
also, is it possible to have like case 1-5 or no?