Cigue
07-11-2010, 09:39 PM
Hey, everytime I run FindNormalRandoms I get a DTM doesn't exist error. The error is at line 352 of AntiRandoms.scar.
i luffs yeww
07-11-2010, 09:49 PM
{$i SRL/SRL.scar}
begin
SetupSRL;
FindNormalRandoms;
end.
Compiled succesfully in 608 ms.
SRL Compiled in 0 msec
Successfully executed.
Cigue
07-11-2010, 10:06 PM
It only happens with my much larger script. Maybe I have wrong variable names or something? My aptly named variable "DTM" comes to mind, even though it's not global.
function FindMod: Boolean;
var
tX, tY: Integer;
begin
if (not UseFindMod) or (not LoggedIn) then exit;
if not SRLBitmapsLoaded then
LoadSRLBitMaps;
if (FindColorTolerance(tX, tY, 14737632, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindColorTolerance(tX, tY, 589815, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
if (FindTransparentBitmapTolerance(bmpMod, tX, tY, clBlack, MCX1, MCY1, MCX1 + 40, MCY2, 15)) or
(FindTransparentBitmapTolerance(bmpAdmin, tx, ty, clBlack, MCX1, MCY1, MCX1 + 40, MCY2, 15)) then
begin
Result := True;
AddToSRLLog('******** FOUND MOD ********');
WriteLn('******** FOUND MOD ********');
TakeScreen('Found mod');
Inc(RandSolved[rand_Mod]);
SaveToChatLog;
if (SRL_Procs[srl_OnFindMod] <> nil) then
SRL_Procs[srl_OnFindMod]();
if (LogoutOnMod) then
begin
Players[CurrentPlayer].Rand := 'Found Mod';
repeat
Logout;
Wait(1500 + Random(500));
until not (LoggedIn);
Wait(60000 + Random(60000));
LoginPlayer;
Players[CurrentPlayer].Rand := '';
end;
end;
end;
{************************************************* ******************************
function FindFight: Boolean;
by: EvilChicken!
Description: Results true if character is in a fight.
************************************************** *****************************}
//Error on this line
function FindFight: Boolean;
begin
Result := False;
if (not LoggedIn) then exit;
if (CountColor(10496, 200, 130, 280, 180) + CountColor(198716, 200, 130, 280, 180) > 50) then
begin
if (CheckHpFirst) and (HpPercent = 100) then exit;
Result := True;
AddToSRLLog('******** FOUND FIGHTING RANDOM ********');
WriteLn('******** FOUND FIGHTING RANDOM ********');
TakeScreen('Found Fight');
Inc(RandSolved[rand_Fight]);
end;
end;
Compiled succesfully in 686 ms.
Starting script
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 153, Members: False, Signed: True, Super Detail: False.
Initializing...
Welcome to Runescape.
Entering Main_FullRun
Entering Setup_Locate
Entering Misc_DTMCheck with DTM Bones
Bones has not been found
Entering Misc_DTMCheck with DTM Bonemeal
Bonemeal has not been found
Entering Main_Ectophial
Entering Misc_FindObject with object Ectofuntus
Entering Main_Bank
Running Antiban
Error: Exception: The given DTM Index[0] doesn't exist at line 352
The following DTMs were not freed: [1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL\Logs\SRL Log 11-07-10 25.txt] has not been freed in the script, freeing it now.
Succesfully saved: C:\Simba\Includes\SRL\SRL\Core\AntiRandoms\AntiRan doms.scar
Cigue
07-11-2010, 10:08 PM
Just after the comment that goes *findfight*
EDIT :
procedure Misc_Antiban;
begin
Writeln('Running Antiban');
if not LoggedIn then Exit;
FindNormalRandoms;
//LampSkill := 'prayer';
case random(200) of
1: RandomRClick;
2..5: begin
HoverSkill('prayer', False);
GameTab(Tab_Inv);
end;
6..8: PickUpMouse;
9..12: RandomMovement;//LINE 352 LINE 352 LINE 352 LINE 352 LINE 352 LINE 352 LINE 352 LINE 352
13: BoredHuman;
14..15: ExamineInv;
16..19: LevelUp;
20..25: IdleTime(500+Random(500),500, 0.4); //Leeched from Munk Clayftner
30..35: SleepAndMoveMouse(500+random(3000));
36: Sleep(Random(30000));
37: begin
GameTab(tab_Friends);
Wait(1000 + Random(500));
GameTab(tab_Magic);
end;
38..100: begin
MMouse(Random(MIX2-MIX1)+MIX1, Random(MIY2-MIY1)+MIY1, 0, 0);
Wait(100 + random(500));
MMouse(Random(MSX2-MSX1)+MSX1, Random(MSY2-MSY1)+MSY1, 0, 0);
Wait(250 + random(250));
end;
end;
end;
EDIT : Got that problem again with line 79 of Color.scar. what's happening?
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.