From: void_hatred
what are you trying to accomplish?
for example if I were to say, FloatToInt(3.14) would you want an output of 3?
if so, last night I was mucking around with SCAR, and looked at the docs, and there is some neat math functions, e.g. Round, Trunc etc.
hope that kind of helps (i'm really new, don't hate me if I'm wrong :))
My main reason for asking is for progress reports. If I want to determine exp per run, or exp per hour, or something like that, if I divide an int, by an int, I don't get an accurate answer. The answer will be truncated. 20/30=0 and stuff like that, which obviously doesn't work. So if I have an int, lets say experience, and I multiply that by a float, lets say exp per bar, as in smithing which might be something like 37.5, so you will end up with a type mismatch error, as you can't do anything with floats and ints together, they just don't comingle well. So the solution I've found is to convert the integer to a string, then convert that string to a float. So instead of my runs counter being an integer as it was originally, it is now a float and I can multiply it by my exp per bar, which is also a float, so that will tell me the correct amount of total exp I have earned while this script was running.
Hopefully this all makes sense…
JIM