Loops
If I have many loops with the same name in a script and I then do goto loop; which of them will I end up at?
July 29th 2004, 02:59 PM

Vedran


You mean this:
void main ( void )
{
goto start;
loop:
say("1", 1);
goto end;
loop:
say("2", 1);
goto end;
loop:
say("3", 1);
goto end;
start:
goto loop;
end:
}
Just check it yourself: assign it to a key, press it in the game and see which number is shown. In this case it is 1.
void main ( void )
{
goto start;
loop:
say("1", 1);
goto end;
loop:
say("2", 1);
goto end;
loop:
say("3", 1);
goto end;
start:
goto loop;
end:
}
Just check it yourself: assign it to a key, press it in the game and see which number is shown. In this case it is 1.
Sure, I could do that. but I'm LAZY man! but perhaps now that you wrote the example script for me...
