SRL Archive - SRL Bugs

Sandwitch.scar


Bionicle

2010-01-28 14:24:38

Line 269: [Error] (15590:30): Invalid number of parameters in script C:\Program Files\SCAR 3.21\includes\SRL\SRL\Core\AntiRandoms\Sandwich.scar

It doesn't matter what revision I switch to, for some reason i keep getting this. It is in the function SolveSandwitchLady:

{*******************************************************************************
function SolveSandwichLady: Boolean;
by: Nielsie95
Description: Solves the Sandwich Lady random.
*******************************************************************************}

function SolveSandwichLady: Boolean;
var
x, y, t, cts, deg: Integer;
s: string;
aci: TAutoColorInfo;
begin
Result := False;
if (not Sandwich_InRandom) then
begin
WriteLn('Not in Sandwich Lady!');
Exit;
end;

with aci do
begin
UpText := 'Talk';
MaxDist := 15;
Color := 8620738;
HueMod := 0.06;
SatMod := 0.81;
LumTol := 19;
MinR := 135; MaxR := 232;
MinG := 99; MaxG := 193;
MinB := 92; MaxB := 191;
MinX := 16.67; MaxX := 61.12;
MinY := 15.12; MaxY := 58.43;
MinZ := 12.38; MaxZ := 56.78;
MinCount := 100;
end;

cts := GetColorToleranceSpeed;
deg := Round(rs_GetCompassAngleDegrees);
MakeCompass('n');
SetAngle(True);
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.2, 0.2);
t := GetSystemTime;

SetAngle(True);
while (not FindColorTolerance(x, y, 2070783, 130, 260, 215, 315, 2)) and
((GetSystemTime - t) < 40000) do
begin
Wait(1500);
if AreTalking then
begin
if (not ClickContinue(True,True)) then
FindNPCChatText('ready to try', ClickLeft);
end
else if FindObjRecordEx(x, y, aci, MSX1, MSY1, MSX2, MSY2, False, False) then
begin
Mouse(x, y, 0, 0, False);
Wait(100 + Random(200));
ChooseOption('Talk');
Wait(500);
FFlag(0);
x := GetSystemTime;
while (not AreTalking) and ((GetSystemTime - x) < 5000) do Wait(100);
end;
end;

if FindColorTolerance(x, y, 2070783, 130, 260, 215, 315, 2) then
begin
s := rs_GetUpTextAt(x, y - 2); //THIS IS THE LINE
s := Trim(LowerCase(Between('Have a', 'for free', s)));
end;
if (s = '') then
begin
WriteLn('Sandwich Lady: Could not find target!');
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(cts);
CloseWindow;
Exit;
end;
WriteLn('Sandwich Lady: Target: '+s);

if Sandwich_SolveQuestion(s) then
begin
if Sandwich_InMenu then
CloseWindow;

with aci do
begin
UpText := 'orta';
MaxDist := 15;
Color := 8565144;
HueMod := 0.10;
SatMod := 0.45;
LumTol := 15;
MinR := 112; MaxR := 193;
MinG := 141; MaxG := 210;
MinB := 90; MaxB := 173;
MinX := 18.35; MaxX := 52.00;
MinY := 23.59; MaxY := 59.81;
MinZ := 13.46; MaxZ := 47.84;
MinCount := 100;
end;

t := GetSystemTime;
while Sandwich_InRandom and ((GetSystemTime - t) < 20000) do
begin
Wait(100);
if AreTalking then
ClickContinue(True,True)
else if FindObjRecordEx(x, y, aci, MSX1, MSY1, MSX2, MSY2, False, False) then
begin
Mouse(x, y, 0, 0, False);
Wait(100 + Random(200));
ChooseOption('Enter');
Wait(500);
FFlag(0);
Wait(4000);
end;
end;
end;

Result := (not Sandwich_InRandom);
MakeCompass(IntToStr(Deg));
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(cts);
end;

E: Problem is even worse now, scroll down!

Dynamite

2010-01-28 14:25:52

Is that trying to compile a script?
Or are you calling it?

Frement

2010-01-28 14:26:52

Well i have the same, you sure you have the scar prerelease? (you srl mems so i dont know why you wouldnt have)

Bionicle

2010-01-28 14:27:10

From: The Man
Is that trying to compile a script?
Or are you calling it?


I am not calling it, i am compiling part of a script I made that worked before i updated. i got the TPAFromText error that a thread has already been made about, and im not getting it anymore, but now i am getting this.

Wanted

2010-01-28 14:27:14

Get SCAR 3.23 :-/

Bionicle

2010-01-28 15:41:19

From: IceFire908
Get SCAR 3.23 :-/


christ…i could have sworn i had 3.23…
im downloading it now…ill tell you if i can compile anything in a few min..

E: Now im getting an error in EvilBob.scar..
Line 118: [Error] (15766:6): Unknown identifier 'SRL_MaxWaitTime' in script C:\Program Files\SCAR 3.23\includes\SRL\SRL\Core\AntiRandoms\EvilBob.scar

E2: I've got a list of the randoms that don't work for me…
//----------------------------------------------------------------------------//
//-- SRL Level 3 Includes --//
//-- --//
//-- MapWalking, AntiRandoms, Objects, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//

{.include SRL/SRL/Core/Animation.scar}
{.include SRL/SRL/Core/Flag.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Object.scar}
{.include SRL/SRL/Core/Bitmaps.scar}
{.include SRL/SRL/Core/Amount.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/WorldSwitcher.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Forester.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
//{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/Leo.scar}
//{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
//{.include SRL/SRL/Core/AntiRandoms/Molly.scar}
{.include SRL/SRL/Core/AntiRandoms/Pillory.scar}
{.include SRL/SRL/Core/Antirandoms/Pinball.scar}
{.include SRL/SRL/Core/Antirandoms/Maze.scar}
{.include SRL/SRL/Core/Antirandoms/CapnArnav.scar}
{.include SRL/SRL/Core/Antirandoms/BeeKeeper.scar}
//{.include SRL/SRL/Core/AntiRandoms/Abyss.scar}
{.include SRL/SRL/Core/AntiRandoms/Mordaut.scar}
//{.include SRL/SRL/Core/AntiRandoms/PrisonPete.scar}
{.include SRL/SRL/Core/AntiRandoms/Mime.scar}
//{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
//{.include SRL/SRL/Core/AntiRandoms/RandomTool.scar}

the ones with the '//' don't work. AntiRandom/AntiRandoms and AntiRandoms/RandomTool are there too because the random scripts that I cut out are called in those scripts, and therefor don't work.
Also to make it work i had to cut out the following in SetupSRL in SRL.scar
  //LoadTeleRandoms;
//SolveSRLRandoms := True;
I can compile scar, but I am completely 'randomless' and i have no idea what to do, nothing i've tried works.

E3: Come on people, i need help :( I've tried a few more things, but nothing is working.

Naike

2010-01-28 15:49:28

Tried updating your plugins..?

Bionicle

2010-01-28 15:50:40

From: N1ke!
Tried updating your plugins..?


That was one of the first things I tried. I'm currently uninstalling scar, and reinstalling it along with the SRL include

E: that seemed to have fixed it…but i still have no idea what the hell happened :p thanks for those who tried to help me, and sorry for being a bother :p

scuz 10

2010-02-02 14:43:40

From: bionicle1800
That was one of the first things I tried. I'm currently uninstalling scar, and reinstalling it along with the SRL include

E: that seemed to have fixed it…but i still have no idea what the hell happened :p thanks for those who tried to help me, and sorry for being a bother :p


What exactly did u do to fix this? I'm having the same problem…

Bionicle

2010-02-02 14:46:26

From: scuz 10
What exactly did u do to fix this? I'm having the same problem…


I uninstalled scar/srl, deleted everything, and reinstalled it all. Using scar 3.23 prerelease and SRL Dev Rev.

scuz 10

2010-02-02 14:49:02

From: bionicle1800
I uninstalled scar/srl, deleted everything, and reinstalled it all. Using scar 3.23 prerelease and SRL Dev Rev.


thanks for the quick reply, where did u get the 3.23 prerelease?

Coh3n

2010-02-02 14:51:30

From: bionicle1800
I uninstalled scar/srl, deleted everything, and reinstalled it all. Using scar 3.23 prerelease and SRL Dev Rev.

It's amazing how many problems that fixes. :rolleyes:

Dynamite

2010-02-02 14:51:39

From: scuz 10
thanks for the quick reply, where did u get the 3.23 prerelease?


Use the search button ;)
IceFire has a guide on it.

Bionicle

2010-02-02 15:14:24

From: scuz 10
thanks for the quick reply, where did u get the 3.23 prerelease?


http://freddy1990.com/svn/scarprerelease/