generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

>= not working

Previous Thread :: Next Thread 
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
16 Apr 2012 04:05 PM
local rounded = math.floor(d+0.5)
if (rounded >= 0) then
revised.Value = rounded
else revised.Value = 0
end

That's the section that is causing me trouble.
When I try to divide by 0, it results in -2million and something, I don't really know exactly but whatever.
local rounded is the negative number, but I want to ensure it never shows up as a negative on the leaderboard, though It does even after this.

Help?
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
16 Apr 2012 04:38 PM
bump.
Report Abuse
silverfire17 is not online. silverfire17
Joined: 28 Jan 2012
Total Posts: 42
16 Apr 2012 04:48 PM
Try dividing any number with zero in a calculator and you'll see why it's not working.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
16 Apr 2012 04:56 PM
Roblox gives an answer as -2million and something.
Therefore, it should not display that if it will only set the value if it is 0 or greater.
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
16 Apr 2012 05:43 PM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image