Ejjman
2007-08-03 22:27:32
This is a tutorial on Labels, also known by some people as pointers…
I. What are they
II. How do I use them
III. Example usage of them
IV. Credits
I. WHAT ARE THEY
Labels are things that you can go back to if you do something wrong in a script. It is a word in bold, and, well, are just plain useful.
II. HOW DO I USE THEM
K. Let's look at this. There's its own spot to put labels.
Now, in the main loop, notice how the indenting is, and also, TheLbl: does not require an end;
III. EXAMPLE USAGE OF THEM
This is taking from my upcoming script.
See, if it misclicks the object,then it will go back and try to click it again! See, it can be pretty useful and take spots of loops in some spots!
IV. CREDITS
Starblaster for teaching. :)
-Ejj
I. What are they
II. How do I use them
III. Example usage of them
IV. Credits
I. WHAT ARE THEY
Labels are things that you can go back to if you do something wrong in a script. It is a word in bold, and, well, are just plain useful.
II. HOW DO I USE THEM
program Lost;
{.include SRL\SRL.scar}
label
TheLbl;
var
Count : integer;
begin
TheLbl:
repeat
Count := Count + 1;
wait(1000);
if(Count = 5)then goto TheLbl;
until(false);
end;
K. Let's look at this. There's its own spot to put labels.
label
Onelbl;
Twolbl;Now, in the main loop, notice how the indenting is, and also, TheLbl: does not require an end;
III. EXAMPLE USAGE OF THEM
This is taking from my upcoming script.
begin
mmm := 0;
Misclick:
if(FindSuperSecretThingyICantSay(mx, my))then
begin
case random(3) of
0: ClickMQuick(True);
1: begin
ClickMQuick(False);
ClickOption('Attack', 1);
end;
2: begin
ClickMQuick(False);
ClickOption('Attack', 1);
end;
end;
if(not(ClickItem))then goto Misclick;See, if it misclicks the object,then it will go back and try to click it again! See, it can be pretty useful and take spots of loops in some spots!
IV. CREDITS
Starblaster for teaching. :)
-Ejj