SRL Archive - OSR Help

Error: Exception: The given DTM Index[3] doesn't exist at line 113


Hazzah

2012-04-07 18:22:40

I get the error while trying to free the FreeDTM(NotedLogDTM); line.

[error]SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 86, Members: True, Signed: True, Super Detail: False.
FOUND BUTLER, CLICKING
FOUND BUTLER, CLICKING
Error: Exception: The given DTM Index[3] doesn't exist at line 113
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap][/error]

Function FindButler: Boolean;
Var
NotedLogDTM,LogToBurnDTM,X,Y,XB,YB,H,H2,I,CTS,T: Integer;
pArray: TPointArray;
aPArray: T2DPointArray;
Begin
LogToBurnDTM:= DTMFromString('m1gAAAHic42JgYHBiYmDwAWI/IA6Ess2B2BGIzYDYGohdgZiTkYHhH1A9E5DmAmIBIBYCYhEgZgdiBqi8ux4XSBUGNlBQQOH/ZyAOMBKJEQAARvoHJA==');
NotedLogDTM := DTMFromString('mAAEAAHic42FgYOAFYhYgZmaAABDNBsTcQMwPxCJALArEwlDMClUH0sMJVccLxTxQPgdUnhGInbRBqpiIxv8ZSAOMJGJkAACCbgKF');
if FindDTM(NotedLogDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,0,0,true);
Wait(RandomRange(800,1000));
end;
Result := False;


If(Not(LoggedIn)) Then
Exit;

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);

SetColorSpeed2Modifiers(0.30, 1.21);
FindColorsSpiralTolerance(MSCX, MSCY, pArray, 1580857, 182,86,339,252, 12);
aPArray := TPAtoATPAEx(pArray, 20, 20);

If (Length(aPArray) = 0) Then
Begin
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;

H := High(aPArray);
If H < 4 Then
H2 := H Else
H2 := 4;

For I := 0 To H2 Do
Begin
MiddleTPAEx(aPArray[I], XB, YB);
MMouse(XB, YB, 4, 4);

If (WaitUpTextMulti(['utle','tler','Butl'],RandomRange(400,500))) Then
Begin
Writeln('FOUND BUTLER, CLICKING');
ClickMouse2(True);
Begin
MarkTime(T);
Repeat
Wait(Random(200));
Until ((FindNPCChatText('coins',Nothing)) Or (FindNPCChatText('cert', Nothing)) Or (TimeFromMark(T) > 8000));
If (FindNPCChatText('coins',Nothing)) Then
Begin
ClickContinue(True, True);
TypeSendEx('1',False);
Wait(RandomRange(800,1000));
TypeSendEx('0', False);
Wait(randomRange(900, 1100));
End;
If (FindNPCChatText('cert', Nothing)) Then
Begin
TypeSendEx('1',False);
Wait(RandomRange(1005,1050));
TypeSendEx('26',True);
Wait(RandomRange(200,500));
End;
End;
End;
FreeDTM(NotedLogDTM);
FreeDTM(LogToBurnDTM);
End;
end;

This is an edited butler handling method from Ashaman's Oak Doorer and if I ever release this script I will be sure to get permission first.

Could anyone explain why this is killing the script?

Ashaman88

2012-04-07 18:35:47

put the frees after one more end down… so there should only be one end after them

Sin

2012-04-07 18:36:50

I was gonna make one of these once I hit 99 Prayer :D