The Dink Network

Reply to Re: reaction time DMOD

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
October 13th 2005, 12:40 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Basicly the script works as follows:

I have a global called &early.

In the main script this is the idea:
spawn("early");
loop:
&early = 2;
wait(<a random amount of time> );
if (&early == 3)
goto loop;
&early = 1;
*the rest of the script*

The script attached to the script early is:
void main( void )
{
loop:
wait(50); //to prevent it from chrashing because the wait(); command is to short. (as Chrispy just mentioned)
wait_for_button();
if (&early == 4)
kill_this_task();
if (&early == 2)
&early = 3;
goto loop;
}

When I run this it just doesn't look like it does anything, it won't go back to the loop when I press the button early. (or perhaps it returns only once, I'm not sure... (But this seems illogical too)) So I blamed it on the limitation of the dinkengine not being able to run two scripts at a time. Both scripts have a wait(); command so it shouldn't be a problem, but it is...

I'm thinking of not fixing the bug and release it anyway untill someone finds a fix. This shouldn't be a mayor pain, because it's unlikely that you would have much (unfair) advantage from using this problem anyway. (and having a disadvantage is impossible so...)