Blockland Forums > Modification Help
"String always evaluates to 0" and finding a ratio
Destiny/Zack0Wack0:
Eww.
Space Guy:
--- Quote ---What if an integer troll makes the game divide by zero?
I just tried 2.25
%multi = 2 / (3-2.25) = 2.666667
--- End quote ---
That's only half of it - look at the "return" statement.
mFloatLength(%width * %multi,0) : mFloatLength(%multi,0)
mFloatLength(2.25 * 2.666667,0) : mFloatLength(2.666667,0)
mFloatLength(6.00000075,0) : 2
6 : 2
(actual string "6:2" returned)
Nexus:
--- Quote from: Nexus on July 06, 2011, 07:22:31 PM ---Ratio would return 6:2
--- End quote ---
--- Quote from: Space Guy on July 09, 2011, 04:11:29 AM ---That's only half of it - look at the "return" statement.
(actual string "6:2" returned)
--- End quote ---
I'm a little confused, did you overlook that or am I overlooking what you are saying?
Chrono:
You're overlooking what he's saying.