Blockland Forums > Modification Help

getRandom returning different results on mac and pc

Pages: << < (9/11) > >>

Treynolds416:

I'm not the only one completely confused here right?

Ipquarx:

I'm making a script that utillizes PRNG's, and when I gave it to a friend that uses a mac, and it returned different results.

Port:


--- Quote from: Ipquarx on May 20, 2012, 11:11:31 AM ---I'm making a script that utillizes PRNG's, and when I gave it to a friend that uses a mac, and it returned different results.

--- End quote ---

Yes?


--- Quote from: M on May 20, 2012, 07:17:21 AM ---Port told you why and you said NO THAT CAN'T BE IT

It returns different results because the algorithm is different, that's the only explanation. There's a good chance that it's not even written directly into Torque, and is simply using the host OS' generator, or some minor difference in execution is causing it. No, you can't "fix" it, it's an issue with the engine. If you don't like it, write your own generator in Torque or set it up as a TCP offloader. Look at your code. No, using a TCP offload is not going to make it "slow" unless you are dumb enough to be expecting it to return at execution time. Read up on asynchronous IO and you'll be fine. Now look back to me. The code is now diamonds.

--- End quote ---


Ipquarx:


--- Quote from: Port on May 20, 2012, 11:47:09 AM ---Yes?


--- End quote ---

--- Quote from: Ipquarx on May 20, 2012, 10:17:21 AM ---I neglected that as the CAUSE of the problem.
The problem still exists.
--- End quote ---

I need help figuring out how to AVOID this problem.

I tried what you said before port, but still around half the time it returned different results.

Port:


--- Quote from: Ipquarx on May 20, 2012, 11:52:07 AM ---I need help figuring out how to AVOID this problem.

I tried what you said before port, but still around half the time it returned different results.

--- End quote ---


--- Quote from: M on May 20, 2012, 07:17:21 AM ---No, you can't "fix" it, it's an issue with the engine. If you don't like it, write your own generator in Torque or set it up as a TCP offloader. Look at your code. No, using a TCP offload is not going to make it "slow" unless you are dumb enough to be expecting it to return at execution time. Read up on asynchronous IO and you'll be fine. Now look back to me. The code is now diamonds.

--- End quote ---


Pages: << < (9/11) > >>

Go to full version