Results 1 to 4 of 4

Thread: Line 162: [Error] (14843:12): Type mismatch in script

  1. #1
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Line 162: [Error] (14843:12): Type mismatch in script

    hi guys, i have this problem with my Oak cutter and banker in draynor: Line 162: [Error] (14843:12): Type mismatch in script. here is the script:
    SCAR Code:
    // start at the oak in draynor near the bank



    program OakOwner;
    {.Include SRL/SRL.Scar}
    var
    LoadsToDo : Integer;
    Banked : boolean;
    const
    OakColor = 3169366 ;// Oak color
    HowManyLoads = 10;
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;

      Players[0].Name :='nereus51';//name of the char
      Players[0].Pass :='492268';//pass of the char
      Players[0].Nick :='eus';//3-4 letters of the char
      Players[0].Active:=True;
    end;
    {Procedure : RandomHoverMMouse)}
    {Author : U L T R A.}
    {Description : Randomly moves the mouse somewhere.}
    Procedure RandomHoverMMouse;
    Begin
      Case Random(6)Of

      0:MMouse(random(250), random(250), 10, 10);
      1:MMouse(random(100), random(100), 50, 50);
      2:MMouse(random(50), random(50), 150, 150);
      3:MMouse(100, 100, 150, 150);
      4:MMouse(300, 300, 100, 100);
      5:MMouse(200, 200, 50, 50);
      end;
      end;
      {end of U L T R A's Procedure}
      procedure Starting;
      begin
      MakeCompass('S');
      GameTab (4);
      end;
     procedure AntiRandom;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
    end;
    procedure LittleAutoResponce;
    begin
    If(FindChatText('Hi'))then
      begin
      TypeSend('Ik spreek geen Engels');
      If(FindChatText('Wc lvl?'))then
      begin
      TypeSend('Beter dan de jouwe');
      end;
      end;
      end;

    function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
     for i := 1 to 12 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          8: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          9: begin
              if FindFight then
              begin
                RunTo('E', True);
                Wait(5000 + random(3000));
                Runback;
               end;
            end;
          10: if FindTalk then
              Result := True;
           11: if ClickToContinue then
              Result := True;
           12: if SolvePinball then
              Result := True;
          end;
      end;
    end;

    procedure LetzChopp;
    var
    x,y : Integer;
    begin
    FindFastRandoms;
    if (FindColorSpiralTolerance(x,y,OakColor,82,52,420,207,6))then
    begin
    if (IsUpText('ak'))then
    begin
    Mouse(x,y,1,1,true);
    wait(50000)
    repeat
    until (InvCount=28);
    end;
    end;
    end;
    Procedure WalkToBank;
    var x,y : Integer;
    begin
    if (InvCount=28) then
    begin
      SymbolAccuracy := 0.5;
      if FindSymbol(x,y,'bank') then
      Mouse(x,y,5,5,True);
      SymbolAccuracy := 0.8;
      flag;
    end;
    end;
    Procedure BankItems;
    begin
    Banked := False;
    if (InvCount=28) then
    begin
      OpenBankFast('db');
      wait(100);
      Deposit(2,28,2);
      wait(100);
     if CloseBank then
     begin
      Banked := True;
    end;
    end;
    end;
    procedure WalkToTheOak;
    begin
    if (Banked (:= True))then
    begin
    MakeCompass('S')
    if RadialWalk(216852,250,300,70,0,1) then
    begin
    Writeln('Walking to the oak');
    wait(5000+random(25));
    exit;
    end;
    end;
    end;
    begin
    SetUpSRL;
    DeclarePLayers;
    LoginPlayer;
    ActivateClient;
    DeclarePlayers;
    RandomHoverMMouse;
    Starting;
    FindNormalRandoms;
    LittleAutoResponce;
    repeat
    LetzChopp;
    WalkToBank;
    BankItems;
    WalkToTheOak;
    until (LoadsToDo >= HowManyLoads)
    end.


  2. #2
    Join Date
    Jun 2007
    Location
    Belgium
    Posts
    333
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if (Banked (:= True))then
    should be

    if (Banked = True)then
    or even just
    if (Banked)then
    Anyways, as far as i understand scripting := is used to asign a certain value to a variable. Like i := 1

  3. #3
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh thx this solved my question


  4. #4
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    The equals sign is used to compare values.

    The colon and equals sign are for declaring values.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Type Mismatch Error, Help!
    By Ultra in forum OSR Help
    Replies: 4
    Last Post: 01-21-2009, 10:24 PM
  2. Replies: 5
    Last Post: 02-03-2008, 10:27 AM
  3. Replies: 2
    Last Post: 08-01-2007, 04:19 AM

Posting Permissions

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