# Thread: Maximum value for a counter?

1. ## Maximum value for a counter?

Ok so I need the maximum value for a counter to be really high. It seems however, that when I increase the maximum value to 999999999 or greater, the number turns into a random value! Arhhh!

EDIT: A quick question...Is it possible to make sure the counter always rounds up to a whole number, rather than having a decimal point?

2. ## Re: Maximum value for a counter?

I assume your max number is to high to be handled.. <img src="/center/images/graemlins/smile.gif" alt="" />
To get rid of decimalpoints, simply put the number within round(), ceil() or floor().

set counter1 to round(1.6) will set the counter to 2
set counter1 to floor(1.6) will set the counter to 1
set counter1 to ceil(1.6) will set the counter to 2

3. ## Re: Maximum value for a counter?

or int() <img src="/center/images/graemlins/smile.gif" alt="" />

4. ## Re: Maximum value for a counter?

i dunno about that random value, seems to work ok for me.
to change a decimal to an integer, use Int( 1234.567) and youll get 1234, apparantly rounds down....
you can use Ceil() and Floor() too.

ive been beaten

5. ## Re: Maximum value for a counter?

Ok thanks for the help on rounding the number up, that works fine! : )
I've still got the problem of the maximum value of the counter not being able to into 9 digits. Just try it, I'm sure it gets messed up. It seems fine once I've typed it in, then I click off the object, and then back onto it, and the value is a big weird number.

6. ## Re: Maximum value for a counter?

9 digits is OK. Any more is beyond the maximum possible.

Perhaps you need two counters - when you reach 999999999 on the first one, set it to zero and add 1 to the second counter.

7. ## Re: Maximum value for a counter?

hmm I was afraid I would have to do that. Oh well I guess I have no choice.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•