SRL Archive - S.M.A.R.T.

Smart Error - Won't load.


10wnu9

2012-06-29 17:49:57

Hey guys, I hope you can help. A few months back my script wouldn't work and smart box popped up and I accidently deleted some of it or changed it, you see I don't know what happened, but I managed to save it.

It's been like this for months, I've Deleted Every Simba and Smart File I can find, but it's still fucked.

I'll post the SMART script wether necessary or not and tell you guys the error I'm getting.


{$DEFINE SRL_SMART}
{$DEFINE SMART}
{.loadlib libsmart}

function IsKeyDown(C:Byte): Boolean;
begin
Result := SmartIsKeyDown(C);
end;

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartHoldMousePlus(x,y,1)
else if button = mouse_middle then
SmartHoldMousePlus(x,y,2)
else if button = mouse_right then
SmartHoldMousePlus(x,y,3)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
end;

procedure ReleaseMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartReleaseMousePlus(x,y,1)
else if button = mouse_middle then
SmartReleaseMousePlus(x,y,2)
else if button = mouse_right then
SmartReleaseMousePlus(x,y,3)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
end;

procedure KeyUp(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;

procedure SendKeys(S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer);
begin
SmartSendKeys(S);
end;

function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
T : TSysProcArr;
I : Integer;
begin
T := GetProcesses;
for I := High(T) downto 0 do
if Pos(TitlePrefix, T[I].Title) <> 0 then
begin
Result := True;
if SetAsTarget then SetTarget(T[I]);
Exit;
end;
end;

procedure GetRealMousePos(var X, Y : Integer);
var
KMTarget, ITarget : Integer;
begin
KMTarget := GetKeyMouseTarget;
ITarget := GetImageTarget;
FindAndSetTarget('Public SMART', True);
GetTClient.IOManager.GetMousePos(X, Y);
FreeTarget(GetImageTarget);
SetKeyMouseTarget(KMTarget);
SetImageTarget(ITarget);

// These are not universial offsets, but works somewhat for some Windows themes.
X := X - 8;
Y := Y - 25;
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

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

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
begin
SetTargetArray(SmartImageArray, 765,503);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

{procedure SmartSaveSettings(v: TVariantArray);
var
i: Integer;
ts: TStringArray;
begin
ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
for i := 0 to 4 do
WriteINI('SMART', ts[i], v[i], ts[5]);
end; }

procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
var
prefix: string;
begin
prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
if(prefix = '')then
begin
writeln('Invalid world number or corrupted world list. Please review your settings');
TerminateScript;
end;
SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503, 's');
//SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
end;

{function SmartLastSettings: TStringArray;
var
i: Integer;
ts: TStringArray;
begin
ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
SetLength(Result, 5);
for i := 0 to 4 do
Result[i] := ReadINI('SMART', ts[i], ts[5]);
end; }


Theres the code, the error I get is this
 'Error: Exception: Access violation at line 101
The following DTMs were not freed: [Bronze Pickaxe, Iron Pickaxe, Steel Pickaxe, Mithril Pickaxe, Adamant Pickaxe, Rune Pickaxe, Dragon Pickaxe, Bronze Hatchet, Iron Hatchet, Steel Hatchet, Mithril Hatchet, Adamant Hatchet, Rune Hatchet, Dragon Hatchet, Normal Logs, Oak Logs, Willow Logs, Maple Logs, Yew Logs, Magic Logs, Clay Ore, Copper Ore, Tin Ore, Iron Ore, Silver Ore, Coal Ore, Gold Ore, Mithril Ore, Adamantite Ore, Runite Ore, Small Fishing Net, Crayfish Cage, Fishing Rod, Fishing Bait, Fly Fishing Rod, Harpoon, Barb-Tail Harpoon, Lobster Pot, Raw Shrimps, Raw Crayfish, Raw Sardines, Raw Anchovies, Raw Herring, Raw Trout, Raw Pike, Raw Salmon, Raw Tuna, Raw Lobster, Raw Swordfish, Raw Monkfish, Raw Shark, Cooked Shrimps, Cooked Crayfish, Cooked Sardines, Cooked Anchovies, Cooked Herring, Cooked Trout, Cooked Pike, Cooked Salmon, Cooked Tuna, Cooked Lobster, Cooked Swordfish, Cooked Monkfish, Cooked Shark, Uncut Sapphire, Uncut Emerald, Uncut Ruby, Uncut Diamond, Bird'S Nest, Feather, Staff Of Air, Staff Of Water, Staff Of Earth, Staff Of Fire, Air Rune, Body Rune, Mind Rune, Earth Rune, Fire Rune, Water Rune, Chaos Rune, Law Rune, Cosmic Rune, Death Rune, Nature Rune, Blood Rune, Soul Rune, Astral Rune, Rune Essence, Pure Essence, Soft Clay, Vial, Vial Of Water, Jug, Jug Of Water, Bowl, Bowl Of Water, Bucket, Bucket Of Water, Air Tiara, Body Tiara, Mind Tiara, Earth Tiara, Fire Tiara, Water Tiara, Dwarven Army Axe, Coal Bag, SRL - Lamp bitmap, 108]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]'


It also Highlights this when It Does so 'procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end; '


Any Idea's guys?

I really want this fixing or something, it's been months. Thanks for the support :spot: !

CephaXz

2012-06-29 17:51:11

Maybe you should search the forum or at least look at the FAQ :)

10wnu9

2012-06-29 17:51:54

I shall.

Based Lord

2012-06-29 17:53:39

Is that not the whole script? You are missing a main loop

CephaXz

2012-06-29 17:55:14

From: Based Lord
Is that not the whole script? You are missing a main loop


Doesn't looks like a script to me.

10wnu9

2012-06-29 17:56:51

Well somethings bust then haha, That's SMART. The Smart script that pops up after I try to Load MSI.

CephaXz

2012-06-29 17:57:51

I think the same problem has been asked at least once per day.

10wnu9

2012-06-29 18:02:29

Ah well, I'm trying to search the forum, But Clearly I fail.

CephaXz

2012-06-29 18:09:27

Oh well… Hope you search more on the forum next time. Can't just rely on the search button everytime :p

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

10wnu9

2012-06-29 18:36:22

Thanks for helping, I'm new to the search bars rofl, I never use them.

Anyhow I'm trying downloading C++ Hopefully this helps, I'll tell you guys in about 10 mins.

Brandon

2012-06-29 19:14:07

From: 10wnu9
Thanks for helping, I'm new to the search bars rofl, I never use them.

Anyhow I'm trying downloading C++ Hopefully this helps, I'll tell you guys in about 10 mins.


You're what? Downloading an entire programming language? :o lol The problem is that Smart v6.9 can only use 32Bit versions of Java 6. Java 7 is a no-no atm for Smart v6.9.

Download Java JDK x32/86 Update 33. I think Yohojo has a thread around here somewhere explaining the lag.. and I posted the links to JDK 6u33 on there.