Simba Code:
procedure GetClayFromBank;
begin
if bankscreen then
begin
WriteLn('found bankscreen');
if finddtm(CLAYDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
AL_MissMouse(Point(X, Y), 2, 2);
sleep(180 + random(220));
if IsUpText('oft') then
begin
Writeln('Taking Clay');
AL_FastClick(mouse_right);
sleep(212 + random(159));
chooseoption('Withdraw-All');
FreeDTM(CLAYDTM);
closebank;
sleep(215 + random(242));
findnoninventoryrandoms();
end
end
end
end;
Error: Exception: The given DTM Index[1] doesn't exist at line 235
The script finds the DTM perfectly the first time round. However, after a second run, I keep getting this error.
Any advice would be greatly appreciated!