mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,081
M
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
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(-,-)

Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Nice and useful idea! +1


Link Copied to Clipboard