SRL Archive - RS3 Help

Another noob question.


Zeal

2014-06-23 14:27:28

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('mbQAAAHicY2VgYOAGYikgZmSAABEg5gNiISAWA2JWqLivEUglEwqWZMAEjFgwGAAAVC8BKw==');


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

2014-06-23 15:58:00

Missing the search box parameter.



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

honeyhoney

2014-06-28 11:06:33

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