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
Random function
Author Message
Extreme
Grandmaster Poster
***

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

SphereCommunity

Post: #10
RE: Random function
EVAL works to make strings become numbers, calculations etc...
Like this:
Code:
LOCAL.EXP += <EVAL (<FAME>*10)/100> // It will ADD 10% of the FAME to LOCAL.EXP
And used to do some operations like the RAND(X)
If you try
Code:
IF RAND(10) == 1 // Wrong, will not work.
or
Code:
IF STRLEN(<SRC.NAME>) // Wrong, will not work too.
The right usage is <EVAL RAND(10)> and <EVAL STRLEN(<SRC.NAME>)>
You should use <R1,10> instead <EVAL RAND(9)>

Edit: use <R1,10> == 1 // 10%

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: 07-11-2012 01:06 PM by Extreme.)
07-11-2012 01:05 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Random function - Lazarus - 07-11-2012, 05:49 AM
RE: Random function - RanXerox - 07-11-2012, 06:14 AM
RE: Random function - Lazarus - 07-11-2012, 07:24 AM
RE: Random function - darksun84 - 07-11-2012, 07:07 AM
RE: Random function - Lazarus - 07-11-2012, 12:39 PM
RE: Random function - RanXerox - 07-11-2012, 07:44 AM
RE: Random function - Anarch Cassius - 07-11-2012, 07:45 AM
RE: Random function - darksun84 - 07-11-2012, 07:47 AM
RE: Random function - Extreme - 07-11-2012, 09:38 AM
RE: Random function - Extreme - 07-11-2012 01:05 PM
RE: Random function - darksun84 - 07-11-2012, 04:52 PM
RE: Random function - Lazarus - 07-12-2012, 03:30 AM
RE: Random function - Extreme - 07-12-2012, 03:33 AM
RE: Random function - Lazarus - 07-12-2012, 03:37 AM
RE: Random function - Extreme - 07-12-2012, 03:47 AM
RE: Random function - Lazarus - 07-12-2012, 03:50 AM
RE: Random function - Extreme - 07-12-2012, 03:54 AM
RE: Random function - Lazarus - 07-12-2012, 04:17 AM
RE: Random function - Lazarus - 07-12-2012, 10:54 AM
RE: Random function - Extreme - 07-12-2012, 11:03 AM
RE: Random function - WRWR - 07-12-2012, 06:56 PM
RE: Random function - darksun84 - 07-12-2012, 07:53 PM

Forum Jump:


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