OK, Everyone who runs my script keeps getting an error.
Does anyone know what this is and how I can fix it?Code:[Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar
T~M
OK, Everyone who runs my script keeps getting an error.
Does anyone know what this is and how I can fix it?Code:[Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar
T~M
Where do you get this error at runtime or not?
nvm.
It doesn't gives me an error.
Move plugins, devs rev, no?
What's at that line, I might can find our where it points to.?
~Hermen
When I hit play it works. Ill run it now.
Jus' Lurkin'
It works for me, but as other people say it after like 1 minute running, they get the error, i think it to do with my countlogs.
T~M
Post the line.
Lazy bum.![]()
~Hermen
line 120 in amount.scar is
if (II < 0) then Exit;
so i dont see whats wrong :/
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
The line before?(post the whole procedure)
~Hermen
Maybe MY countlogs is wrong, maybe I dont put it in loop properly or something, I dont know lol
T~M
Don't lol me if you want answer, LoL, post the lines here; you're the one that wants help![]()
~Hermen
Sorry I replied to the post before yours wasnt loaded by the time
Umm the whole procedure in Amount.scar is:
And my countlogs is:SCAR Code:{*******************************************************************************
function GetAmount(ItemX, ItemY: Integer): Integer;
By: ZephyrsFury
Description: Returns the amount of an item at coordinates (ItemX, ItemY).
Returns approximate values for 'K' and 'M'.
*******************************************************************************}
function GetAmount(ItemX, ItemY: Integer): Integer;
var
S: string;
Col, II: Integer;
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if (FindColorsTolerance(TPA, 65536, ItemX - 50, ItemY - 50, ItemX + 50, ItemY + 50, 0)) then
begin
SortTPAFrom(TPA, Point(ItemX, ItemY));
ATPA := SplitTPAEx(TPA, 5, 5);
B := GetTPABounds(ATPA[0]);
if (Length(ATPA[0]) < 15) or (B.X2 - B.X1 < 5) or (B.Y2 - B.Y1 < 5) then Exit;
Result := 1;
for II := 2 downto 0 do
if (FindColorsTolerance(TPA, 7575987 * II * II - 6796134 * II + 65535, B.X1 - 10, B.Y1 - 10, B.X2 + 10, B.Y2 + 10, 0)) then
Break;
if (II < 0) then Exit;
SortTPAFrom(TPA, Point((B.X1 + B.X2) shr 1, (B.Y1 + B.Y2) shr 1));
ATPA := SplitTPAEx(TPA, 5, 5);
TPA := ATPA[0];
Col := 7575987 * II * II - 6796134 * II + 65535;
B := GetTPABounds(TPA);
S := Trim(GetTextAtEx(B.X1, B.Y1 - 1, 0, StatChars, False, False, 0, 1, Col, 5, True, tr_AllChars));
Result := StrToIntDef(GetNumbers(S), 1);
if (Pos('M', S) > 0) then Result := Result * 1000000 else
if (Pos('K', S) > 0) then Result := Result * 1000;
end;
end;
And my chopping loop is:SCAR Code:Procedure CountTheLogs;
var
WillowsDTM, LogsInTheInv: Integer;
begin
if not LoggedIn then Exit;
GameTab(4);
WillowsDTM := DTMFromString('78DA637461626078C680027C5D6518F881342' +
'310FF07024613A09A270C6880118904D23640351F09A80900AA79' +
'45408D1750CD4DFC6A001E780A9E');
LogsInTheInv := ItemAmount('inv', 'dtm', WillowsDTM, []);
InventoryWillows := InventoryWillows+LogsInTheInv;
FreeDTM(WillowsDTM);
writeln(inventorywillows);
end;
SCAR Code:function ChoppingLoop: Boolean;
var
T, x, y, i: Integer;
Colour: Integer;
begin
repeat
begin
AntiRandom;
MarkTime(T);
if FindWillow(x, y) then
begin
Mouse(x, y, 3, 3, False);
Wait(100+random(200));
if ChooseOption('hop') then
begin
Colour := GetColor(x, y - 5);
Wait(1000+random(2000));
while (SimilarColors(Colour, GetColor(x, y - 5), 4) and not(InvFull)) do
begin
MakeCompass('N');
Result := True;
CountTheLogs;
i:=random(30);
if i = 1 then
begin
AntiBanage;
Wait(randomrange(100,250));
end;
Wait(100);
AntiRandom;
SleepAndMoveMouse(2500+random(100));
if TimeFromMark(T) >= 20000 then Break;
end;
end;
end;
end;
until(InvFull);
end;
hope this helps
T~M
Isn't that an Int?SCAR Code:writeln(inventorywillows);
What ya mean?
What should it be?
T~M
scar 3.20 + doesn't have to be inttostr if thats what your getting at.
I do visit every 2-6 months
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
A little backwards compatibility doesn't help. I do that as well.
Also, you can only do that when you are only writing that to debug. So this:Would not work while this:SCAR Code:program New;
var
i : integer;
begin
i := 1337;
writeln('Number is: ' + i);
end.
would workSCAR Code:program New;
var
i : integer;
begin
i := 1337;
writeln('Number is: ' + IntToStr(i));
end..
There are currently 1 users browsing this thread. (0 members and 1 guests)