SRL Archive - RS3 Help

SPS Path working, but not perfectly.


Laquisha

2016-05-11 20:34:22

From: Kemosisss


my antiban wasnt technically established yet since I wasnt calling it in the "main" loop. I called it in the mineRocks(); area and it was giving me an error that antiban(); didnt exist.


And this is why is does matter where you write your methods. If you call a method which has not been defined, then the compiler will throw that error. In most cases you can just rearrange your script, but in some cases you can't (such as when methods call each other). This is when you use a forward declaration:


program new;

procedure bar() forward; // Let compiler know this exists somewhere below

procedure foo();
begin
bar();
end;

procedure bar();
begin

end;

begin
end.