Hi, sorry for wasting your time
.
Here's my error :
SCAR Code:
Line 84: [Error] (16303:21): Type mismatch in script C:\Program Files\SCAR 3.15\Scripts\Vial Emptyer.scar
Failed when compiling
And here are the lines around that line :
SCAR Code:
Wait(1000);
HML:=(Edit1.Text)+(1);
ClearDebug;
Writeln('2');
In case you want to see whole script :
SCAR Code:
program VialEmptyer;
{.include SRL/SRL.scar}
var
x,y,I,EV,HML: Integer;
frmDesign : TForm;
Label1 : TLabel;
Edit1 : TEdit;
Button1 : TButton;
procedure SetupScript;
begin
ClearDebug;
SetupSRL;
ActivateClient;
end;
procedure EmptyVials;
begin
If Not (LoggedIn) then
begin
Writeln('Not logged in, read instructions.');
TerminateScript;
end else
I:=1;
repeat
MouseItem(I,false);
ChooseOption('mpty');
Wait(250+random(150));
I:=I+1;
until(I = 28);
EV:=EV+28;
end;
procedure BankVials;
begin
OpenBankQuiet('vwb');
Wait(250+random(100));
If (BankScreen) then
begin
FixBankTab;
DepositAll;
Wait(250+random(150));
Withdraw(1,1,28+random(50));
Wait(500+random(350));
CloseBank;
end;
end;
procedure AR;
begin
Case Random(2) of
1: Exit;
2: FindNormalRandoms;
end;
end;
procedure Proggy;
begin
ClearDebug;
Writeln('Emptied : '+ IntToStr(EV*(28)) +' vials.');
Writeln('Script ran for : '+ TimeRunning);
end;
procedure MainLoop;
begin
HML:=HML-(1);
repeat
EmptyVials;
BankVials;
AR;
Proggy;
until(EV = HML);
end;
procedure ButtonClick(sender: TObject);
begin
frmDesign.ModalResult:= mrOk;
ClearDebug;
Writeln('Please Wait, starting script...');
Writeln('Script starts in...');
Writeln('3');
Wait(1000);
HML:=(Edit1.Text)+(1);
ClearDebug;
Writeln('2');
Wait(1000);
ClearDebug;
Disguise('Vial Emptyer by Dervish !!!');
Writeln('1');
Wait(1000);
ClearDebug;
Writeln('0 !!! Lets go !!!');
MainLoop;
end;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 433;
frmDesign.Top := 114;
frmDesign.Width := 213;
frmDesign.Height := 90;
frmDesign.Caption := 'Vial Emptyer v0.2 by Dervish!!!';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 4;
Label1.Top := 8;
Label1.Width := 110;
Label1.Height := 17;
Label1.Caption := 'Vial emptyer by Dervish';
Edit1 := TEdit.Create(frmDesign);
Edit1.Parent := frmDesign;
Edit1.Left := 0;
Edit1.Top := 32;
Edit1.Width := 113;
Edit1.Height := 21;
Edit1.TabOrder := 8;
Edit1.Text := 'How Many Loads ?';
Button1 := TButton.Create(frmDesign);
Button1.OnClick := @ButtonClick;
Button1.Parent := frmDesign;
Button1.Left := 120;
Button1.Top := 8;
Button1.Width := 81;
Button1.Height := 41;
Button1.Caption := 'Start Script';
Button1.TabOrder := 9;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
SafeInitForm;
SafeShowFormModal;
end.
Help me please !