Posted: Mon Nov 16, 2009 9:05 pm Post subject: Time
What is it you are trying to achieve?
Create a downward counting timer according to what the user has entered. The int needs to be changed into a string aswell for Font.Draw
What is the problem you are having?
Can't seem to get it to work. If its in the main loop, the program waits for it to count down to zero then starts. If its in a separate process, the program waits for it to get to zero, starts and the timer goes into negative numbers
What I have tried to solve this problem
Turing:
get time_remaining
for i:1..time_remaining
delay(1000)% Delays 1 second
time_remaining -=1% Subtracts 1 from the time
time_remaining_display :=intstr(time_remaining)% Converts it to a string for Font.Draw endfor
I've also tried the for loop in a process and forked it, but it still doesn't work.
Please specify what version of Turing you are using
4.1
Sponsor Sponsor
Tony
Posted: Mon Nov 16, 2009 9:16 pm Post subject: Re: Time
D_homes @ Mon Nov 16, 2009 9:05 pm wrote:
I've also tried the for loop in a process and forked it, but it still doesn't work.
Did you just try to throw some random code at the problem, without understanding what it does, in hopes that it might somehow solve the problem?
Also, your loop doesn't appear to have any sort of output (any sort of put, draw, etc.)