glad to help out. keep in mind that you can pass a function as many diferent vaiables as you want, and they can be of diferent types as well.
you can also have the function reture a value (only one though)
so you can use a function to calculate a certain number for you, or return other values, etc.
SCAR Code:
function FindTree(treeColor: Integer;): Boolean;
var succes: Boolean;
begin
succes:=false;
If(FindObj3(x, y, 'hop', treeColor, 10)) Then
begin
WriteLn('found tree');
succes:=true;
end;
Result:=succes;
end;
and result would be the return value.
then you can do
SCAR Code:
if FindTree(566031) then
begin
writeln('celebration');
end;
[/scar]