View Full Version : I'm getting what appears to be a SMART error. (Invalid Parameters)
Silba
08-20-2012, 06:24 PM
Hey guys I know alot of people have been getting an error like this and have bee resolved but none of the solutions are working for me and I'm really puzzled.
Please don't tell me to search - I've already searched and read around 8 topics with similar problems as mine but I cant seem to get it working. :thumbsdown:
Here's the error lines coming to the Smart tab in Simba after pressing start script on 2 scripts.
[Error] C:\Users\Reece\Desktop\Simba\Includes\SRL/SRL/Misc/Smart.simba(46:19): Invalid number of parameters at line 45
Compiling failed.
[Error] C:\Users\Reece\Desktop\Simba\Includes\SRL\SRL\Misc \Smart.simba(56:19): Invalid number of parameters at line 55
Compiling failed.
And here's the lines the error messages are referring to:
[53]procedure SendKeys(const S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer); {$IFDEF Lape}override;{$ENDIF}
[54]begin
[55] SmartSendKeys(S);
[56]end;
[44]end;
[45]
[46]procedure KeyDown(key: Word); {$IFDEF Lape}override;{$ENDIF}
----------
I assume the line 45 error doesn't matter because its blank and that I can just delete that line? Which still leaves me with an error on line 54 (previously line 55)
Hey guys I know alot of people have been getting an error like this and have bee resolved but none of the solutions are working for me and I'm really puzzled.
Please don't tell me to search - I've already searched and read around 8 topics with similar problems as mine but I cant seem to get it working. :thumbsdown:
Here's the error lines coming to the Smart tab in Simba after pressing start script on 2 scripts.
[Error] C:\Users\Reece\Desktop\Simba\Includes\SRL/SRL/Misc/Smart.simba(46:19): Invalid number of parameters at line 45
Compiling failed.
[Error] C:\Users\Reece\Desktop\Simba\Includes\SRL\SRL\Misc \Smart.simba(56:19): Invalid number of parameters at line 55
Compiling failed.
And here's the lines the error messages are referring to:
[53]procedure SendKeys(const S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer); {$IFDEF Lape}override;{$ENDIF}
[54]begin
[55] SmartSendKeys(S);
[56]end;
[44]end;
[45]
[46]procedure KeyDown(key: Word); {$IFDEF Lape}override;{$ENDIF}
----------
I assume the line 45 error doesn't matter because its blank and that I can just delete that line? Which still leaves me with an error on line 54 (previously line 55)
there should be a line near the top called, {$i srl/srl/misc/PaintSmart.simba}, Change it to {$i srl/srl/misc/SmartGraphics.simba}
That Should fix it, if it does not, Post the code here and i'll take a look. You may even need to update your extensions but we will wait and see.
Peanuts
08-21-2012, 04:04 AM
If the lines blank it doesn't mean you just delete it..
It probably means something is missing, like theres meant to be an end; there or something..
Can you post the whole script... Kinda hard to tell from what you have linked.
E: Code wrap it to pleaseeeeeeeeeeeeee
nt4rz
08-21-2012, 05:38 PM
i got the same problem.. please help
Silba
08-21-2012, 06:39 PM
there should be a line near the top called, {$i srl/srl/misc/PaintSmart.simba}, Change it to {$i srl/srl/misc/SmartGraphics.simba}
That Should fix it, if it does not, Post the code here and i'll take a look. You may even need to update your extensions but we will wait and see.
If the lines blank it doesn't mean you just delete it..
It probably means something is missing, like theres meant to be an end; there or something..
Can you post the whole script... Kinda hard to tell from what you have linked.
E: Code wrap it to pleaseeeeeeeeeeeeee
I can't find that code at the top or at any point in the script also I've checked for updates on everything inside Simba and re-installed everything too. - Below is the SMART Script that is producing the errors.
{$DEFINE SRL_SMART}
{$DEFINE SMART}
{$loadlib libsmart}
function IsKeyDown(C: Word): Boolean; {$IFDEF Lape}override;{$ENDIF}
begin
Result := SmartIsKeyDown(C);
end;
procedure MoveMouse(x, y: Integer); {$IFDEF Lape}override;{$ENDIF}
begin
SmartMoveMouse(x, y);
end;
procedure HoldMouse(x, y: Integer; button : integer); {$IFDEF Lape}override;{$ENDIF}
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); {$IFDEF Lape}override;{$ENDIF}
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: Word); {$IFDEF Lape}override;{$ENDIF}
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: Word); {$IFDEF Lape}override;{$ENDIF}
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
procedure SendKeys(const S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer); {$IFDEF Lape}override;{$ENDIF}
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
{$IFDEF Lape}
WriteLn('GetRealMousePos is not supported in Lape');
X := -1;
Y := -1;
{$ELSE}
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;
{$ENDIF}
end;
procedure GetMousePos(var x, y: Integer); {$IFDEF Lape}override;{$ENDIF}
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; {$IFDEF Lape}override;{$ENDIF}
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; {$IFDEF Lape}override;{$ENDIF}
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((Byte(not(Signed)) + 1) * Byte(not((SuperDetail and Signed)))) + ',m' + IntToStr(Byte(Members)), 765, 553, '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; }
You must not have searched very hard.
http://villavu.com/forum/showthread.php?t=88578
Silba
08-21-2012, 06:57 PM
Hmm ok, thanks everyone turns out that i was getting a bit confused over which script to look and replace the lines in.
Many thanks guys :)
@NKN, I found many posts like that so yes, I did indeed search hard for about an hour before I even thought about posting my thread because I know how much you 'experts' or whatever you call yourselves hate it - I was just looking at the wrong script :P Again, thanks all!
i got the same problem.. please help
You need to look at the top of the 'bot' script and not the SMART script. Hope it works out for you.
nt4rz
08-21-2012, 07:05 PM
Hmm ok, thanks everyone turns out that i was getting a bit confused over which script to look and replace the lines in.
Many thanks guys :)
@NKN, I found many posts like that so yes, I did indeed search hard for about an hour before I even thought about posting my thread because I know how much you 'experts' or whatever you call yourselves hate it - I was just looking at the wrong script :P Again, thanks all!
You need to look at the top of the 'bot' script and not the SMART script. Hope it works out for you.
should i replace all the lines or just a few?
Silba
08-21-2012, 07:12 PM
should i replace all the lines or just a few?
http://villavu.com/forum/showthread.php?t=88578
Replace all the lines indicated in this post 1 by 1 until it works.
nt4rz
08-21-2012, 07:14 PM
Never mind it worked =D Thanks! But everytime i open the script do i have to write all those codes again?
Silba
08-21-2012, 07:19 PM
Never mind it worked =D Thanks! But everytime i open the script do i have to write all those codes again?
Save the script and open the newly saved one each time.
nt4rz
08-21-2012, 08:00 PM
Save the script and open the newly saved one each time.
Thanks :)
One more question though, how do i change the settings in the game?
I mean when i open RS with simba i cant click "settings".
I want to make everything low as possible, i cant do that in centos because i dont have java plugin installed and have no idea how to do it
Silba
08-21-2012, 10:25 PM
Thanks :)
One more question though, how do i change the settings in the game?
I mean when i open RS with simba i cant click "settings".
I want to make everything low as possible, i cant do that in centos because i dont have java plugin installed and have no idea how to do it
I don't know anything about cent os, On windows when you login there is a picture of what looks like a golden cog or gear OR in the login screen click the spanner icon at the top right and go from there. Or if you mean your mouse doesn't appear to be working in the runescape client then you have to click "disable smart" under runescape but in the same window (the SMART Window) and then re-enable it when you're done.
Vinyl Scratch
08-22-2012, 03:05 AM
Thanks :)
One more question though, how do i change the settings in the game?
I mean when i open RS with simba i cant click "settings".
I want to make everything low as possible, i cant do that in centos because i dont have java plugin installed and have no idea how to do it
You have to click "Disable SMART" then you have control over it.
lolskilla
08-28-2012, 07:41 PM
Hmm ok, thanks everyone turns out that i was getting a bit confused over which script to look and replace the lines in.
Many thanks guys :)
@NKN, I found many posts like that so yes, I did indeed search hard for about an hour before I even thought about posting my thread because I know how much you 'experts' or whatever you call yourselves hate it - I was just looking at the wrong script :P Again, thanks all!
You need to look at the top of the 'bot' script and not the SMART script. Hope it works out for you.
thank you very much. this bottom part is what finally made it all make sense to me :) very helpful indeed
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.