Page 1 of 1

better way to do that

Posted: 07.03.2019 14:31
by 01101011
hi guys, i have a problem with FindType, FindTypeEx and FindTypesArrayEx. I want that function got the first item found in ground, but "finditem" got the last item found, i did that for solve:

Code: Select all

procedure Test;
begin
	while (FindTypesArrayEx(TestType, [$0000], [Ground], false) > 0) do 
	begin  
		if FindTypesArrayEx(TestType, [$0000], [Ground], false) > 0 then
		begin      
			TestList := TStringList.Create;
			GetFindedList(TestList);
			UseObject(StrToInt('$' + TestList.Strings[0]));
			wait(100);
			ignore(StrToInt('$' + TestList.Strings[0]));
			TestList.Free;
		end;
		wait(100);  
	end;
end;
when i use the object, he dissapear. don´t worry about IF =]]]

have any other easy method to do that? for use less processing??? =]]]

ty for atention

Re: better way to do that

Posted: 09.03.2019 6:02
by Vizit0r
no, thats normal mechanics of work in FindType.