Results 1 to 3 of 3

Thread: Type mismatch in script...

  1. #1
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default Type mismatch in script...

    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 !

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  3. #3
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Thanks alot, your help is precioussssss....ssss my preciouss......
    Rep ++ =)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sorry me again (Type mismatch in script)
    By StrikerX in forum OSR Help
    Replies: 8
    Last Post: 04-12-2008, 12:41 PM
  2. Type mismatch in script.
    By Wade007 in forum OSR Help
    Replies: 12
    Last Post: 02-18-2008, 12:12 PM
  3. need help autofisher...Type mismatch in script
    By robeike in forum OSR Help
    Replies: 5
    Last Post: 02-22-2007, 12:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •