If you want to use call functions that haven't been declared yet, meaning the one that's calling it is above it.
For each of your functions do this
Here's one from one of my scripts.
I got this function.
function CheckDemon:Boolean;
begin
writeln('OutOfPlanks!')
FindColorTolerance(x,y,2108777,0,0,429,219,5)
Mouse(x,y,0,0,false)
repeat
wait(50)
untiL(ChooseOption('Fetch'))
WaitFor(203,389,0,5)
Mouse(203,389,0,0,true)
end;
At the top of ALL my functions I would put(meaning at the top of the script in general… I got mine right below my variable declaration. Like this:
program New;
{.include srl/srl.scar}
var
x,y,z,Build,Remove:integer;
function CheckDemon:Boolean; Forward;
function CheckDemon:Boolean; Forward;
All you do is copy each functions name and add Forward; to the end of it.
If you do it to all your custom functions and put the list at the top of your script; each function will be able to call each one, regardless of order. Hope it makes sense, since I'm kind of stoned at the moment. :S Good Luck.