SRL Archive - Help and Support

[Runtime Error]


tarajunky

2006-04-17 01:49:13

Yes, I've run into the same runtime error that other SRL noobs have.

[Runtime Error] : Exception: Access violation at address 00650C79 in module 'scar.exe'. Read of address 00000030 in line 80 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\AntiRandoms.scar

That happens the very first time I attempt to run FindNormalRandoms.

Here are the relevant portions of my code…

program ChickenKiller;
{.include \srl\srl.scar}
var tmpx,tmpy,StartTime,StrengthLevel,AttackLevel,Lumby,exp,Upchar,
TalkCount,SmallFont,Fighting,FarmDTM,Feather,DeadChicken,Unarmed,FeatherCount,
Monsterkills,ChurnIcon,ChickenSpot,ChickenSpot2,ChickenSpot3,ChickenSpot4:integer;

Const
StartPlayer = 0; // Determines who will play first
StatToTrain ='Strength';
// Do not touch below this line without permission//
FontPath='.\CharsChat\';
ChickenColor=15527150;
FeatherColor=10240;
ChurnColor=80479;
LampSkill='Strength';
Road1=5592411;
Road2=3816000;
monsterexp=12;

Procedure Check4Randoms;
begin
If FindcolorSpiral(tmpx,tmpy,65535,1,1,515,335) then ChatsOff;
If (GambleNewBox) or (FrogPlaceFound) or (Mime) then
begin
Writeln('Found Mime or Frog');
SaveScreenshot(AppPath+'MimeFrog'+InttoStr(random(50))+'.bmp');
ClickMouse(757,-29,true);
TerminateScript;
end;
If FindDTM(Lumby,tmpx,tmpy,550,5,760,160) then
begin
WalkFromLumby;
Exit;
end;
FindNormalRandoms;
FindCerter;
End;

begin
SetupSRL;
StartItUp;
RepeatMe;
begin
Writeln('Reached target level');
ClickMouse(757,-29,true);
TerminateScript;
end;
end.

It's a Scarscape script that originally used SSI2.txt which I am in the process of converting over to SRL. I can make it compile, log in, fight, etc, but the randoms crash it every time.

timmyboy

2006-04-17 09:13:24

Have you tried running it again? As I read somewhere that that mistake just sometimes appears and can be fixed by running the script again, not sure though, let me look into it.

Sdcit

2006-04-17 14:01:55

in checkrandoms checkfornormalrandoms will suffice. If it still doesnt work, use everything but findmod