Started by
RedWirePlatinum
on
Topic category: Troubleshooting, bugs, and solutions
I made a progress bar for my mod that has 7 different images that appears like the furnace fire when smelting. I noticed when you try to do something like "6/7" (returns 0) or "9/7" (returns 1) that it ALWAYS rounds down the number. Please *don't* round down numbers when dividing, it's very annoying. If I wanted to round down the result, I'd use the "round down" math block.
The answer to this is to type out the actual number (ex: 6/7 is ~0.85). Still annoying, as I said.
This depends on which type of variables is used. For example, if you have an int variable, you can not use decimal numbers with them as they are not supported. However, if you use a float or a double variable, it will support them as they are made for that.
I see. How would I use float or double variables then?
Still kinda waiting for a response, but i found a way to make this work as intended, probably not *the* way but still
Slight update: Trying to do "7.0" just makes the number 7, so that doesn't help
(For the regular number thing)
Until I get a response from Goldorion, here's another alternate solution
Okay so you just have to make at least *one* number have a decimal instead of both
Still waiting for a response >:(((((((
Here's a 3rd alternative (do NOT use "random integer between")
i just entered the text editor thing and changed the 7 to 7.0