Раньше делал так:
Code: Select all
function LastCorpse: Cardinal;
var
FindedList : TStringList;
begin
Result := FindType(Corpse, Ground);
if Result > 0 then
begin
FindedList := TStringList.Create;
if GetFindedList(FindedList) then
Result := StrToInt('$' + FindedList.Strings[0]);
FindedList.Free;
end;
end; { LastCorpse }