LightWalker 0 Posted August 7, 2004 Anyone have an idea on how to make a number integer in ofp. Or at least a number with no more than 2 decimals? Share this post Link to post Share on other sites
olseric 0 Posted August 7, 2004 From OFPEC... Quote[/b] ]You can use mod to round a decimal number down to the nearest whole number. For example, if you wanted to use the command random to generate a whole number between 0 and 6 you could put this in a script:-_rand = random 6 _num = _rand - (_rand mod 1) Share this post Link to post Share on other sites
Blanco 0 Posted August 9, 2004 or... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _r = random 6 _r = _r - _r % 1 Share this post Link to post Share on other sites