RISK
2011-12-11 16:35:51
I would like this function to return two values:
The values I would like to return are a boolean and a TPoint. But, as far as I can tell, there is no direct way to do this without using global variables. Is there another way to have it return two values?
function InMine: Boolean;
var
I : Integer;
posMM : TPoint;
begin
if (not(LoggedIn)) then
Exit;
FindNormalRandoms;
for I := 1 to 5 do
begin
case (I) of
1 : posMM := Point(247, 241); // Center of essence mine
2 : posMM := Point(312, 176); // Northeast
3 : posMM := Point(320, 315); // Southeast
4 : posMM := Point(173, 319); // Southwest
5 : posMM := Point(173, 175); // Northwest
end;
Result := SPS_PosOnMM(posMM);
if (Result) then Break;
end;
end;The values I would like to return are a boolean and a TPoint. But, as far as I can tell, there is no direct way to do this without using global variables. Is there another way to have it return two values?