SRL Archive - OSR Help

DTMS were not freed


cradlefatal

2013-02-27 23:07:57

I am trying to get this to find item from bank and I get this error when it starts up can someone tell me what I'm doing wrong

[Exception: Range check error at line 20
The following DTMs were not freed:]

program new;
{$DEFINE SMART8}
{$I SRL/SRL.simba}
{$i SPS/SPS.simba}
{$I SRL/SRL/misc/SmartGraphics.simba}
{$i SRL/SRL/misc/debug.simba}
{$i ObjectDTM\ObjDTMInclude.simba}






Var
Swordfish,x,y:integer;
begin
Swordfish := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(Swordfish,x, y,1, 1, 542, 442) then
writeln('Congratz! You have just found your first DTM!')
end. //The Name of the DTM
// The X and the Y to store the cords for the DTM.

const
function ObjDTM_WalkPath(Path:Withdrawx TStringArray; FlagDistance, PollRate,
Tries: Integer; CheckEndPoints, GroundLevel: Boolean): Boolean;

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;





Procedure LoadDTM;
Begin
Swordfish := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(Swordfish,x, y,1, 1, 542, 442) then
end;

Procedure Withdrawx;
Begin
if FindDTM(Swordfish, x, y, MIX1, MIY1, MIX2, MIY2) then; // MI is the cords of the Invent
begin
MMouse(x,y,5,5); // Hovers over log
If Isuptext('Swordfish')then // If text up yew log it will click it
begin
mouse(x,y,5,5,true);
end else
Writeln('No DTM found'); // If cant find DTM it will say this.
end;
end;

Begin
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
ClearDebug;
SetupSRL; // MAIN LOOP
ActivateClient;
DeclarePlayers;
Swordfish; // CALL the loading first
Withdrawx;
end.
begin
end.

tealc

2013-02-27 23:25:25

does this link help http://villavu.com/forum/showthread.php?t=78418

Justin

2013-02-27 23:33:27

FreeDTM(Swordfish);

Call that at the end of your script.

cradlefatal

2013-02-27 23:37:07

a little bit I'm really just having trouble figuring out where the script should be inserted and I usually get the errors there but if I was right should I look like this
program new;
{$DEFINE SMART8}
{$I SRL/SRL.simba}
{$i SPS/SPS.simba}
{$I SRL/SRL/misc/SmartGraphics.simba}
{$i SRL/SRL/misc/debug.simba}
{$i ObjectDTM\ObjDTMInclude.simba}






Var
GetItems,x,y:integer;
begin
Swordfish := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(Swordfish,x, y,1, 1, 542, 442) then

writeln('Congratz! You have just found your first DTM!')
end.


//The Name of the DTM
// The X and the Y to store the cords for the DTM.

const
function ObjDTM_WalkPath(Path:Withdrawx TStringArray; FlagDistance, PollRate,
Tries: Integer; CheckEndPoints, GroundLevel: Boolean): Boolean;

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;





Procedure Swordfish;
Begin
Swordfish := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(Swordfish,x, y,1, 1, 542, 442) then
end;

Procedure GetItems;
Begin
if FindDTM(Swordfish, x, y, MIX1, MIY1, MIX2, MIY2) then; // MI is the cords of the Invent
begin
MMouse(x,y,5,5); // Hovers over log
If Isuptext('Swordfish')then // If text up yew log it will click it
begin
mouse(x,y,5,5,true);
end else
Writeln('No DTM found'); // If cant find DTM it will say this.
end;
end;








Begin


Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
ClearDebug;
SetupSRL; // MAIN LOOP
ActivateClient;
DeclarePlayers;
DTMZ;
Addonterminate('FREEDTMZ');
repeat
CrushProcess;
until (not Loggedin);
FREEDTMZ;
terminatescript();
end.

cradlefatal

2013-02-27 23:50:29

okay I changed it around to this and I still got it
program new;
{$DEFINE SMART8}
{$I SRL/SRL.simba}
{$i SPS/SPS.simba}
{$I SRL/SRL/misc/SmartGraphics.simba}
{$i SRL/SRL/misc/debug.simba}
{$i ObjectDTM\ObjDTMInclude.simba}






Var
GetItems,x,y:integer;
begin
GetItems := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(GetItems,x, y,1, 1, 542, 442) then

writeln('Congratz! You have just found your first DTM!')
end.


//The Name of the DTM
// The X and the Y to store the cords for the DTM.

const
function ObjDTM_WalkPath(Path:Withdrawx TStringArray; FlagDistance, PollRate,
Tries: Integer; CheckEndPoints, GroundLevel: Boolean): Boolean;

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;





Procedure Swordfish;
Begin
Swordfish := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(Swordfish,x, y,1, 1, 542, 442) then
end;

Procedure GetItems;
Begin
if FindDTM(Swordfish, x, y, MIX1, MIY1, MIX2, MIY2) then; // MI is the cords of the Invent
begin
MMouse(x,y,5,5); // Hovers over log
If Isuptext('Swordfish')then // If text up yew log it will click it
begin
mouse(x,y,5,5,true);
end else
Writeln('No DTM found'); // If cant find DTM it will say this.
end;
end;








Begin


Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
ClearDebug;
SetupSRL; // MAIN LOOP
ActivateClient;
DeclarePlayers;
DTM;
Addonterminate('FREEDTM');
repeat
CrushProcess;
until (not Loggedin);
FREEDTM(GetItems);
terminatescript();
end.

tealc

2013-02-27 23:56:30

do you have any errors now

cradlefatal

2013-02-27 23:57:32

yeah Exception: Range check error at line 20
The following DTMs were not freed:

Sjoe

2013-02-28 00:02:47

oh dear lord cradle. follow tutorials properly…. Not the first time.

and u didn't even give the procedure a name.

cradlefatal

2013-02-28 00:04:17

yeah the procedures name is Swordfish if I try and use GetItems then it gives me a duplicate error

cradlefatal

2013-02-28 00:06:06

I mean GetItems

tealc

2013-02-28 00:07:44

program new;
{$DEFINE SMART8}
{$I SRL/SRL.simba}
{$i SPS/SPS.simba}
{$I SRL/SRL/misc/SmartGraphics.simba}
{$i SRL/SRL/misc/debug.simba}
{$i ObjectDTM\ObjDTMInclude.simba}






Var
GetItems,x,y:integer;
begin
GetItems := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(GetItems,x, y,1, 1, 542, 442) then

writeln('Congratz! You have just found your first DTM!')
end.


//The Name of the DTM
// The X and the Y to store the cords for the DTM.

const
function ObjDTM_WalkPath(Path:Withdrawx TStringArray; FlagDistance, PollRate,
Tries: Integer; CheckEndPoints, GroundLevel: Boolean): Boolean;

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;





Procedure Swordfish;
Begin
Swordfish := DTMFromString('78DA6394636260D8C5C8800C0A03CAC1344C9' +
'45108A8E60CAA1A06062654355298E660A85101F2F712506302E4' +
'EF27A04603C8DF8A5F0D0074D4069C');
if FindDTM(Swordfish,x, y,1, 1, 542, 442) then
end;

Procedure GetItems;
Begin
if FindDTM(Swordfish, x, y, MIX1, MIY1, MIX2, MIY2) then; // MI is the cords of the Invent
begin
MMouse(x,y,5,5); // Hovers over log
If Isuptext('Swordfish')then // If text up yew log it will click it
begin
mouse(x,y,5,5,true);
end else
Writeln('No DTM found'); // If cant find DTM it will say this.
end;
end;








Begin


//Smart_Server := 10;
// Smart_Members := True;
//Smart_Signed := True;
ClearDebug;
SetupSRL; // MAIN LOOP
ActivateClient;
DeclarePlayers;
DTM;

repeat
CrushProcess;
until (not Loggedin);
FreeDTM(Swordfish);
FreeDTM(GetItems);
end.

try something like this

cradlefatal

2013-02-28 00:40:23

Okay I'm going to take a better look at it in the AM bout to go to bed night all