Author Topic: getRandom returning different results on mac and pc  (Read 1996 times)

For some strange reason, a mac is returning different results for getRandom than on a PC.
This was what the seed was set to:
12314108575108575847526104526 74907490747475251113186867577 11610411784271221175124112075 6767676774877366

Now i know it's huge, but why does it return different results? How do I prevent this from happening?

For some strange reason, a mac is returning different results for getRandom than on a PC.
This was what the seed was set to:
12314108575108575847526104526 74907490747475251113186867577 11610411784271221175124112075 6767676774877366

Now i know it's huge, but why does it return different results? How do I prevent this from happening?
Isn't that what it's supposed to do?... There are no arguments for a seed in getRandom.
I'll assume you meant getRandomSeed, which doesn't need any arguments.

Daenth, the random number generator uses a seed. That seed can be set with setRandomSeed.
That is the seed that was used.

Daenth, the random number generator uses a seed. That seed can be set with setRandomSeed.
That is the seed that was used.
Ah, my bad. I did a quick skim over the functions guide and didn't catch that.

Quote from: Badspot
I know it sucks but you signed on for this bullstuff when you bought a macintosh.   

Quote from: Badspot
I know it sucks but you signed on for this bullstuff when you bought a macintosh.
/agree

/agree
No no no no no, it's not that. Something is happening with the function itself, NOT RELATING to the operating system itself.

You know that your script isn't the only function that uses getRandom right? Even the engine calls use it.

==>setRandomSeed("test");
-the engine or some other script uses getRandom, changing the base by one or more-
==>getRandom( ...

Badspot should allow HA HA us to register separate HA generators with their own seeds HA HA HA I'm sorry I just can't stop laughing at the idea of something actually being added to support modders oh god please prove me wrong and/or kill me

Badspot should allow HA HA us to register separate HA generators with their own seeds HA HA HA I'm sorry I just can't stop laughing at the idea of something actually being added to support modders oh god please prove me wrong and/or kill me
why does there need to be something built into the game to let us have our own random number generators

we can make them no problem right now, it'd just be a lot easier if torque hexadecimal support wasn't so wonky

why does there need to be something built into the game to let us have our own random number generators

we can make them no problem right now, it'd just be a lot easier if torque hexadecimal support wasn't so wonky

Because getRandom, getRandomSeed and setRandomSeed are public. All scripts share them. Thus for seeded generations, you can't be sure you're actually getting your own private generations unless you're doing it all at once.

Because getRandom, getRandomSeed and setRandomSeed are public. All scripts share them. Thus for seeded generations, you can't be sure you're actually getting your own private generations unless you're doing it all at once.
i thought he meant making an entirely new pseudorandom number generator

What do you mean by different results?

btw:
double = getRandom(min,max);

What do you mean by different results?

btw:
double = getRandom(min,max);

what

What do you mean by different results?

btw:
double = getRandom(min,max);
That's exactly what I pointed out up there:

Isn't that what it's supposed to do?... There are no arguments for a seed in getRandom.
I'll assume you meant getRandomSeed, which doesn't need any arguments.
Daenth, the random number generator uses a seed. That seed can be set with setRandomSeed.
That is the seed that was used.