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
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|