$= is what makes the check work, stick with it
the only reason i can think of to avoid strings (rather than bad practice in some cases maybe) is that it can be slower, but this is only really relevant on a much bigger scale
Ok thanks. I'll stick with $=.
Anyways, I've probably over-complicated what I'm trying to do, so I'll give you the context to see if there is an easier way of doing things:
Basically, I'm going to be getting a time every 100ms, counting up/down from numbers that I specify. The times that I will be getting are going to be 0, 100, 200, ... 2800, 2900, 3000, etc...
I want to display these times to the user as seconds. I've nailed this fine, and everything is working, but it annoys me when it goes from 2.8, 2.9 then 3, skipping 2 characters and making the text on the right jump back and fourth. So I just added a .0 to all whole numbers as they are getting displayed. this is the function I am using on every number in the commandToClient('bottomprint'...) line:
function milToDec(%num)
{
%num /= 1000;
if(%num $= mFloor(%num))
%num = %num @ ".0";
return %num;
}
is there a better way of adding a .0 to whole numbers?