The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to compare random values
Author Message
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #12
RE: How to compare random values
Well, in my opinion, you have to specify better the things, both players A, B and C are equals?

If yes, my code is the right thing to use, even it make you freeze.
If A is better and it have more chance or something else, it can have first try...

You can try this:

PHP Code:
LOCAL.<R1,20>
IF <
dLOCAL.A> < 20
 DORAND 2
 BEGIN
  LOCAL
.<R1,<EVAL 20-<dLOCAL.A>>>
  
LOCAL.<EVAL 20-<dLOCAL.A>-<dLOCAL.B>>
 
END
 BEGIN
  LOCAL
.<R1,<EVAL 20-<dLOCAL.A>>>
  
LOCAL.<EVAL 20-<dLOCAL.A>-<dLOCAL.C>>
 
END
 ENDDO
ENDIF 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 06-18-2014 08:02 AM by Extreme.)
06-18-2014 07:59 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Extreme's post
Post Reply 


Messages In This Thread
How to compare random values - kn4tseb - 06-17-2014, 01:28 PM
RE: How to compare random values - XuN - 06-17-2014, 05:58 PM
RE: How to compare random values - kn4tseb - 06-18-2014, 12:05 AM
RE: How to compare random values - Seron - 06-18-2014, 12:50 AM
Re: How to compare random values - Extreme - 06-18-2014, 02:14 AM
RE: How to compare random values - Coruja - 06-18-2014, 02:21 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 02:42 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 07:22 AM
RE: How to compare random values - Extreme - 06-18-2014, 07:45 AM
RE: How to compare random values - Skul - 06-18-2014, 07:31 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 07:51 AM
RE: How to compare random values - Extreme - 06-18-2014 07:59 AM
RE: How to compare random values - Skul - 06-18-2014, 08:00 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 08:08 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 09:12 AM
RE: How to compare random values - XuN - 06-18-2014, 07:19 PM
RE: How to compare random values - Coruja - 06-19-2014, 12:49 AM
RE: How to compare random values - kn4tseb - 06-19-2014, 01:33 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)