SRL Archive - S.M.A.R.T. Questions and Answers.

Line 101 Help


Le Jingle

2012-04-26 23:31:44

My script compiles, yet when I press play, it will say,
"Compiled successfully in 0 ms.
Error: Exception: Access violation at line 101
"

Plus it'll open a new tab in simba and highlight the last 'end' with orange.

function IsRealMouseInBox(B : TBox): Boolean;
var
P : TPoint;
begin
GetRealMousePos(P.X, P.Y);
Result := PointInBox(P, B);
end;

Any advice is welcome, can post my simple script here too if need be.

Total

2012-04-26 23:37:38

Reinstall Java 6 Update 31 32 bit.

Le Jingle

2012-04-26 23:48:38

I'm on a x64 windows os, but I installed both the 32 and 64 bit (v6 update 31), it still does the same thing :x
*I have no problem running other scripts in smart. o.o

(p.s. should I remove the 32?)

Total

2012-04-26 23:58:21

You need 32 bit version, and if it doesn't work idk what else to say because 100% of the time I see this problem its because of java.

Gestapo

2012-04-26 23:59:06

http://villavu.com/forum/showthread.php?t=79977

Le Jingle

2012-04-27 00:13:02

Followed the steps from that link Xenophis, got the same error. :s
So here's the basic script that gives me the error:

Program UnfPots;
{$DEFINE SMART}
{$DEFINE SRL5}
{$i srl/srl.simba}
Const
{------------------------------------------------------------------------------}
{------------------------------------Setup-------------------------------------}


// 1. Enter How Many Potions To Be Made. (Possibly Account for 10% DG Effect)
Unfinished_Pots_To_Make = 28;
// 2. Enter Your FPS Refresh Rate, #'s 0-100, Higher = Faster.
ScreenSpeed = 69;
// 3. Will Determine How Fast To Move Your Mouse (Enter Any Integer)
MouseRate = 55;
// 4. Enter Your Rs Username. (Replace put_RSN_here)
RS_Username = 'zezima'; ///////////////////
// 5. Enter Your Rs Password. (Replace put_PW_here)
RS_Password = 'Not a Real Password'; ////////////////////
// 6. Which World To Login? (Make Sure It's A Members World)
World_To_Use = 24;


{---------------------------------End of Setup---------------------------------}
{------------------------------------------------------------------------------}
Var
TTLunf, PerHr : Integer;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := RS_Username;
Players[0].Pass := RS_Password;
Players[0].Active := True;
Players[0].WorldInfo := [true, World_To_Use];
end;

Function Antiban: Boolean;
Begin
If Not LoggedIn Then Exit;
Result:=True;
Case Random(1001) Of
0..200:
Begin
RandomMovement;
End;
201..1000:
Begin
RandomRClick;
End;
End;
End;

Procedure Mix;
Var
i, j, x, y, UnfBox : Integer;
Begin
i := (RandomRange(1, 13));
j := (RandomRange(15, 23));
UnfBox := DTMFromString('mGQAAAHicY2RgYJBlZGDYDcT/Z8gz8AP5IkDMAAAldQK1');
If InvMouse(i, Mouse_Left) Then
Begin
If InvMouse(j, Mouse_Left) Then
Begin
If FindDTM(UnfBox, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
Wait(3000+Random(250));
Mouse(x,y,15,15,True);
Wait(100+Random(25));
While IsMoving Do
Wait(100+Random(25));
Wait(RandomRange(8000, 10500));
Antiban();
WriteLn('Success! (Making Unfinished Potions)');
IncEx(TTLunf, 14);
End;
FreeDTM(UnfBox);
End;
End;
End;

Procedure BankChest;
Begin
OpenBankChest(SRL_BANK_SW);
If (BankScreen) Then
Begin
Exit;
End Else
BankChest;
End;

Procedure Bank;
Begin
BankChest;
DepositAll;
Wait(100+random(25));
Withdraw(9, 0, 14);
Wait(100+random(25));
Withdraw(8, 0, 14);
Wait(100+random(25));
CloseBank;
End;

procedure ProgressReport;
begin
PerHr := Round((TTLunf * 3600) / (GetTimeRunning / 1000));
ClearDebug;
WriteLn(Replicate('-', 30));
WriteLn(' Unf Pots Maker ');
WriteLn(' Time Spent Mixing = '+ TimeRunning);
WriteLn(' Unf Potions Made ~ '+ ToStr(TTLunf));
WriteLn(' Unf Pots / Hour ~ '+ ToStr(PerHr));
WriteLn(Replicate('-', 30));
end;

Procedure SetUp;
Begin
SmartSetRefresh(ScreenSpeed);
MouseSpeed := MouseRate;
MakeCompass('W');
FindNormalRandoms;
SetAngle(SRL_ANGLE_HIGH);
Wait(RandomRange(400, 600));
End;

Procedure CiaoTornaPresto;
Begin
Writeln('Done.');
CloseWindow;
LogOut;
TerminateScript;
End;

Procedure MainLoop;
Begin
Bank;
Mix;
ProgressReport;
End;

Begin
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := False;
Smart_SuperDetail := False;
DeclarePlayers;
LoginPlayer;
SetUp;

Repeat
If Not LoggedIn Then
Begin;
CiaoTornaPresto;
End Else
MainLoop;

Until(TTLunf=Unfinished_Pots_To_Make)
If (TTLunf=Unfinished_Pots_To_Make) Then
CiaoTornaPresto;
End.

Gestapo

2012-04-27 00:15:18

Do other scripts work ?

Le Jingle

2012-04-27 00:16:01

From: Xenophis
Does other scripts works ?


Yea, that's what confuses me. I'm fine running other scripts that use smart, but my little short script above gets rejected.

Gestapo

2012-04-27 00:16:48

Ohh, i hope than that any of scripters will help you :)

Le Jingle

2012-04-27 03:20:33

From: Xenophis
Ohh, i hope than that any of scripters will help you :)


Thanks, I'm sure it's something obvious that I am totally missing, checked throught the script again and ca't find >.<

masterBB

2012-04-27 05:14:59

You have no SetupSRL in this script, add it in the main loop at the following location:
  Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;

Le Jingle

2012-04-28 16:54:11

From: masterBB
You have no SetupSRL in this script, add it in the main loop at the following location:
  Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;


OMG I just laughed at myself for a good 20 seconds >.<

thank you so much :*