Mat
2012-05-12 14:25:05
Error: Exception: The given DTM Index[296] doesn't exist at line 242
Not a clue why, could it be tripping up on the calling?Mat
2012-05-12 14:25:05
Error: Exception: The given DTM Index[296] doesn't exist at line 242
Not a clue why, could it be tripping up on the calling?2012-05-12 14:29:19
2012-05-12 14:36:02
From: masterBB
I need some code, probably the dtm couldn't be found in the memory.
PrayerPot :=DTMFromString('mlwAAAHicY2dgYJjKxMAwH4h7gXguEE8D4glA3APEwowQLALEPEAsDsRiQCwAxNYHJwB1M2HFGgy4ASMeDAUAA/AGdw==');Function DTMMouseInv(DTM:Integer; Item:String):Boolean;Var
pX,pY:integer;
begin
Ftab(25);
If FindDTM(DTM,pX,pY,MiX1,MiY1,MiX2,MiY2)then
begin DTMMouseInv(PrayerPot,'PrayerPot'); 2012-05-12 15:12:06
2012-05-12 15:13:31
From: Runaway
Where/how are you declaring it before using it in DTMMouseInv()?
2012-05-12 15:21:05
2012-05-12 15:28:49
From: Mat
Error: Exception: The given DTM Index[295] doesn't exist at line 1073
The following DTMs were not freed: [0, 1, 2, 3, 4, 5, 'Prayerpot', 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, SRL - Lamp bitmap, 18]
2012-05-12 15:31:28
From: Runaway
Hmm… It looks like that could be the problem right there. If PrayerPot was declared properly, it would be listed as #6 in the DTM array…
Do a Ctrl+F for 'Prayerpot' and double check everything that comes up?
DTMMouseInv(EpicPrayer ,'Prayer Pot');
DTMMouseBank(EpicPrayer);?
2012-05-12 15:32:09
2012-05-12 15:35:18
2012-05-13 16:58:24
begin
loadDTMs
repeat
Mainloop;
FreeDTMs;
until not LoggedIn;
end.begin
repeat
loadDTMs;
Mainloop;
FreeDTMs;
until not LoggedIn;
end.
2012-05-13 17:35:35
{$I SRL/SRL.Simba}
var
GlobalDTM: Integer;
procedure LoadAllDTMs;
begin
GlobalDTM:= DTMFromString('Some Random Base64Code Here');
end;
Procedure FreeAllDTMs;
begin
FreeDTM(GlobalDTM);
end;
Function DTMMouseBox(Item: Integer; Uptexts: TStringArray; Box: TBox): Boolean;
var
X, Y: Integer;
begin
Result:= False;
If FindDTM(Item, X, Y, Box.X1, Box.Y1, Box.X2, Box.Y2) then
begin
MMouse(X, Y, 5, 5);
Result:= IsUptextMultiCustom(Uptexts);
if Result then
ClickMouse2(MOUSE_LEFT);
end;
end;
begin
SetupSRL;
LoadAllDTMs;
AddOnTerminate('FreeAllDTMs');
DTMMouseBox(GlobalDTM, [''], MSBox);
DTMMouseBox(GlobalDTM, [''], MIBox);
end.