# I need a working counter.

• 03-05-2002
Esparno
I need a working counter.
Can anyone show me the code for a working counter, what I want to happen is in this code:

A:
X=X+1;
if (X==10000000)
goto end;
goto A

but every time i run it, it opens up the window and then closes it instantly, I want it to open up for at least 5 seconds though...
• 03-05-2002
neandrake
If you wanted to, instead of:

X = X + 1;

do this:

X = X +.1; //or X+=.1 does the same thing. Also, .1 might be too little, try .5 even.

If you do this, then you'll need to declare X as:
double X;
or
long double X;
• 03-05-2002
Esparno
it didnt work, i even tried this:

A:
X=X+.00000001;
if (X=1000000000)
goto end;
goto A;
• 03-05-2002
neandrake
You need to use the double equals sign in the if statement!

if (X==100000000) {
• 03-05-2002
Esparno
GRRRRRRRRRRRRRRRR

*Hits himself for makeing a SUPER newby mistake*

I deserved that for wasting ur time......

Sorry, and I am much abliged that you could help me :) Thanks a lot!
• 03-05-2002
neandrake
no problem :)