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!