PDA

View Full Version : Another noob question.



Zeal
06-23-2014, 06:27 PM
Can someone let me know what exactly I'm doing wrong here?

I get this error when I compile: Exception in Script: Don't know which overloaded method to call with params (Int32) at line 73, column 6

It occurs on every line with "findDTM(maplelogsDTM)"






procedure fletchLogs();
var
maplelogsDTM: integer;

begin
if not isLoggedIn() then //Exits procedure is logged out
exit;

if not tabBackpack.isOpen() then //Opens backpack if not already
begin
tabBackpack.open();
wait(randomRange(500, 2000));
end;


maplelogsDTM := DTMFromString('mbQAAAHicY2VgYOAGYikgZmSAABEg5gNiIS AWA2JWqLivEUglEwqWZMAEjFgwGAAAVC8BKw==');


if not findDTM(maplelogsDTM) then //Exits procedure if no logs in backpack
exit;

if findDTM(maplelogsDTM) then //Finds maple logs
begin
typesend(KEY_BIND,false); //Types '1' for logs in action bar
wait(randomRange(600,1200));
if toolScreen.isOpen() then
begin
typesend('2',false); //Types '2' for knife on tool screen
wait(randomRange(600, 1200));
if productionScreen.isOpen() then
begin
productionScreen.clickStart(); //Gets past the production screen
wait(randomRange(600, 1200));
//else writeLn('Something went wrong at production screen');
end;
//else writeLn('Something went wrong at tool screen');
end;
//else writeLn('something went wrong with keybind
end;

FreeDTM(maplelogsDTM);

end;

The Mayor
06-23-2014, 07:58 PM
Missing the search box parameter.



procedure something();
var
x, y: integer;
begin
findDTM(x, y, myDTM, mainScreen.getBounds());
end;

honeyhoney
06-28-2014, 03:06 PM
Additionally, you could use SRL-6's TRSTabBackpack.countDTM function. It will return the number of times the DTM appears in the backpack tab.

It also means you could do something like this:

procedure fletchLogs();
begin
if tabBackpack.countDTM(mapleLogDTM) > 0 then
begin
//do fletching here
end;
end;
Source: http://docs.villavu.com/srl-6/backpack.html#trstabbackpack-countdtm