mIRC Home    About    Download    Register    News    Help

Topic Options
#264203 - 09/11/18 05:21 AM $rand range includes negative numbers
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 970
Allow $rand(-10,10) to return a number from the range -10 through +10, and $rand(-20,-10) to return a number from the range -20 through -10.

$rand currently treats a negative number as if text, so $rand(-4,5) is $null and $rand(-4,Z) is $chr($asc(-)) thru $chr($asc(Z)) instead of $null. $rand(-20,-10) always returns hyphen because it's the same as $rand(-,-)

Top
#264204 - 09/11/18 01:35 PM Re: $rand range includes negative numbers [Re: maroon]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
Nice and useful idea! +1
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top