ID:261982
 
When I use this:
    for(N2=1,N2==5,N2++)
world << "BLAH!"
sleep(5)


I don't see any blahs!

Help would be appreciated,
~~> Dragon Lord
Unknown Person wrote:
When I use this:
>   for(N2=1,N2==5,N2++)
> world << "BLAH!"
> sleep(5)
>

I don't see any blahs!

Help would be appreciated,
~~> Dragon Lord

Maybe try for(N2=1, N2 < 4, N2++)
The reason is that you screwed up the condition in your loop. N2==5 is true only later in the loop, not at the beginning, so the loop never begins because N2 is initiailzed to 1.

If this was changed to !=5 it would work, but it'd be very very wrong. In code like this you should avoid != because < is clearly better. If N2 is never meant to be 5 or more, then 6 is obviously out too. Using < guarantees that if N2 ever somehow got contaminated with a fractional value, it'd still work.

Lummox JR