Not a clue why, could it be tripping up on the calling?Code:Error: Exception: The given DTM Index[296] doesn't exist at line 242
Mat
Printable View
Not a clue why, could it be tripping up on the calling?Code:Error: Exception: The given DTM Index[296] doesn't exist at line 242
Mat
I need some code, probably the dtm couldn't be found in the memory.
I have like 20DTM's and I'm Pushing each one in to one function:
Simba Code:PrayerPot :=DTMFromString('mlwAAAHicY2dgYJjKxMAwH4h7gXguEE8D4glA3APEwowQLALEPEAsDsRiQCwAxNYHJwB1M2HFGgy4ASMeDAUAA/AGdw==');Simba Code:Function DTMMouseInv(DTM:Integer; Item:String):Boolean;Simba Code:Var
pX,pY:integer;
begin
Ftab(25);
If FindDTM(DTM,pX,pY,MiX1,MiY1,MiX2,MiY2)then
begin:/Simba Code:DTMMouseInv(PrayerPot,'PrayerPot');
E:
It works in my Banking Function, im not freeing it either, but it doesn't work in the inv function :/
Where/how are you declaring it before using it in DTMMouseInv()?
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]
Wtf?
Its there but its erroring?
WTF?
I had this exactly problem on my frost dragon er
Once I finish up here and I get home I'll post yjr solution
Its horrible typing on this bphonr lull.
Only way I got it to work is having one for each function, the only thing that is stopping my FDK I'm like how the?
:/
Mat
My guess is that your freeing them but not reloading them.
For example this will not work:
Simba Code:begin
loadDTMs
repeat
Mainloop;
FreeDTMs;
until not LoggedIn;
end.
But this will:
Simba Code:begin
repeat
loadDTMs;
Mainloop;
FreeDTMs;
until not LoggedIn;
end.
Memory leak.. You keep loading and loading on the same variable thus u get that multiple indices not freed..
Simba Code:{$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.