Results 1 to 6 of 6

Thread: stupid errors...

  1. #1
    Join Date
    Oct 2006
    Location
    H0M3
    Posts
    142
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default stupid errors...

    its late and i'm tired so the answer is ovious but still its not occuring to me..
    + rep to the first person whos solution works.

    SCAR Code:
    Procedure Equipmentcheck;
    begin
      FindAxe;
      If FindAxe Then
      WriteLn('Hatchet Found');
    end;

    Failed when compiling
    i get Line 155: [Error] (17103:12): Type mismatch in script
    where am i going wrong?

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is FindAxe not a boolean?

    maybe change to

    SCAR Code:
    procedure EquipmentCheck;
    begin
      if(FindAxe)then
        Writeln('HatchetFound');
    end;

  3. #3
    Join Date
    Oct 2006
    Location
    H0M3
    Posts
    142
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nope tried that

    even tried
    SCAR Code:
    procedure EquipmentCheck;
    begin
      if(FindAxe = true)then
        Writeln('HatchetFound');
    end;
    still nothing

  4. #4
    Join Date
    Oct 2006
    Location
    H0M3
    Posts
    142
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    btw heres the whole script so far:
    SCAR Code:
    program DraynorWillBanker;
    {.Include SRL\SRL.SCAR}
    {.Include SRL\SRL\skill\WoodCutting.scar}


    var
      WillowTree: array [0..6] of integer;
      x,y:integer;
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;                 //How many players?
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name         := '';       //username
      Players[0].Pass         := '';       //password
      Players[0].Nick         := '';       //3-4 letters of name
      Players[0].Pin          := '';       //bank Pin
      Players[0].Booleans[0]  := true;     //true if weilding an axe
      Players[0].Booleans[1]  := true;     //true if using sleep
      Players[0].Integers[1]  := 10;       //Switch players/relog after how many loads?
      Players[0].Active := True;
    end;


    Procedure IntroText;
    begin
      ClearDebug;
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn(' ____                          ');
      Wait(150);
      WriteLn('|    \ ___ ___ _ _ ___ ___ ___ ');
      Wait(150);
      WriteLn('|  |  |  _| . | | |   | . |  _|');
      Wait(150);
      WriteLn('|____/|_| |__,|_  |_|_|___|_|  ');
      Wait(150);
      WriteLn('              |___|            ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn('                               ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn('| | | |_| | |___ _ _ _         ');
      Wait(150);
      WriteLn('| | | | | | | . | | | |        ');
      Wait(150);
      WriteLn('|_____|_|_|_|___|_____|        ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn('                               ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn(' _____         _               ');
      Wait(150);
      WriteLn('| __  |___ ___| |_ ___ ___     ');
      Wait(150);
      WriteLn('| __ -| . |   |  _| -_|  _|    ');
      Wait(150);
      WriteLn('|_____|__,|_|_|_,_|___|_|      ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
    end;

    procedure ApxCustomAntiban;
    begin
      if(not(LoggedIn))then
      Exit;
      case Random(13) of
        0: RandomRClick;
        1: begin
             HoverSkill('woodcutting', false);
             wait(4000+random(1000));
             GameTab(4);
           end;
        2: begin
             HoverSkill('fishing', false);
             wait(4000+random(1000));
             GameTab(4);
           end;
        3: begin
             MakeCompass(Random(300));
             Wait(random(3000));
             MakeCompass('N');
           end;
        4: begin
             PickUpMouse;
             BoredHuman;
           end;
        5: SayCurrentLevels('woodcutting');
        6: PickUpMouse;
        7: WriteLn('No Antiban this round');
        8: begin
             GameTab(1 + Random(12));
             wait(4000+random(4000));
             GameTab(4);
           end;
        9: begin
             case random(8) of
               0: TypeSend('Fishing lvls?');
               1: TypeSend('Fishing levels');
               2: TypeSend('Woodcutting lvls');
               3: TypeSend('Wc levels');
               4: TypeSend('Exp till next level');
             end;
           end;
        10: MouseBox(MSX1,MMY1,MMX2,MMY2,3);
        11: WriteLn('No Antiban this round');
        12: SleepAndMoveMouse(400000+random(200000));
      end;
    end;

    procedure LoadTreeArray;
    begin
      WillowTree[0] := 1979698
      WriteLn('Willow Tree Array 1 loading...');
      wait(500);
      WriteLn('Sucessfull!!');

      WillowTree[1] := 2637622
      WriteLn('Willow Tree Array 2 loading...');
      wait(500);
      WriteLn('Sucessfull!!');
     
      WillowTree[2] := 1518369
      WriteLn('Willow Tree Array 3 loading...');
      wait(500);
      WriteLn('Sucessfull!!');
     
      WillowTree[3] := 1780784
      WriteLn('Willow Tree Array 4 loading...');
      wait(500);
      WriteLn('Sucessfull!!');
     
      WillowTree[4] := 3165781
      WriteLn('Willow Tree Array 5 loading...');
      wait(500);
      WriteLn('Sucessfull!!');
     
      WillowTree[4] := 2110778
      WriteLn('Willow Tree Array 6 loading...');
      wait(500);
      WriteLn('Sucessfull!!');
    end;


    Procedure Equipmentcheck;
    begin
      FindAxe;
      If FindAxe Then
      WriteLn('Hatchet Found');
    end;


    begin
    IntroText;
    end.

  5. #5
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    rev 32?

    FindAxe returns a string.. one sec..

    I'll get the fix

    SCAR Code:
    program DraynorWillBanker;
    {.Include SRL\SRL.SCAR}
    {.Include SRL\SRL\skill\WoodCutting.scar}


    var
      WillowTree: array [0..6] of integer;
      x,y:integer;
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;                 //How many players?
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name         := '';       //username
      Players[0].Pass         := '';       //password
      Players[0].Nick         := '';       //3-4 letters of name
      Players[0].Pin          := '';       //bank Pin
      Players[0].Booleans[0]  := true;     //true if weilding an axe
      Players[0].Booleans[1]  := true;     //true if using sleep
      Players[0].Integers[1]  := 10;       //Switch players/relog after how many loads?
      Players[0].Active := True;
    end;


    Procedure IntroText;
    begin
      ClearDebug;
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn(' ____                          ');
      Wait(150);
      WriteLn('|    \ ___ ___ _ _ ___ ___ ___ ');
      Wait(150);
      WriteLn('|  |  |  _| . | | |   | . |  _|');
      Wait(150);
      WriteLn('|____/|_| |__,|_  |_|_|___|_|  ');
      Wait(150);
      WriteLn('              |___|            ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn('                               ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn('| | | |_| | |___ _ _ _         ');
      Wait(150);
      WriteLn('| | | | | | | . | | | |        ');
      Wait(150);
      WriteLn('|_____|_|_|_|___|_____|        ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn('                               ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
      WriteLn(' _____         _               ');
      Wait(150);
      WriteLn('| __  |___ ___| |_ ___ ___     ');
      Wait(150);
      WriteLn('| __ -| . |   |  _| -_|  _|    ');
      Wait(150);
      WriteLn('|_____|__,|_|_|_,_|___|_|      ');
      Wait(150);
      WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
      Wait(150);
    end;

    function FindAxeBool: Boolean;
    var
      Ix, Iy: Integer;
      I, InvAxe, WieldAxe, FoundAxe: Byte;

    begin
      if not LoggedIn then exit;
      srl_LoadBitmaps([47, 48, 49, 50, 51, 52, 53, 54]);
      I := 0;

      repeat
        case GetCurrentTab of
          5: begin
               for WieldAxe := 0 to 7 do
                 if FindBitmapToleranceIn(srl_GetBitmap(54-WieldAxe),Ix, Iy, 566, 285, 606, 327, 10) then
                   Break;
               if I = 0 then
                 if not GameTab(4) then exit;
               Inc(I);
             end;

          4: begin
               for InvAxe := 0 to 7 do
                 if FindBitmapToleranceIn(srl_GetBitmap(54 - InvAxe), Ix, Iy, MIX1, MIY1, MIX2, MIY2, 10) then
                   Break;
               if I = 0 then
                 if not GameTab(5) then exit;
               Inc(I);
             end;
        else
          if not GameTab(5) then exit;
        end;
      until I = 2;

      if (InvAxe = 8) and (WieldAxe = 8) then
      begin
        Writeln('No axe was found.');
        Result := False;
        srl_FreeBitmaps;
        Exit;
      end;

      FoundAxe := Min(WieldAxe, InvAxe);
     
      Result := True;
      srl_FreeBitmaps;
    end;

    procedure ApxCustomAntiban;
    begin
      if(not(LoggedIn))then
      Exit;
      case Random(13) of
        0: RandomRClick;
        1: begin
             HoverSkill('woodcutting', false);
             wait(4000+random(1000));
             GameTab(4);
           end;
        2: begin
             HoverSkill('fishing', false);
             wait(4000+random(1000));
             GameTab(4);
           end;
        3: begin
             MakeCompass(Random(300));
             Wait(random(3000));
             MakeCompass('N');
           end;
        4: begin
             PickUpMouse;
             BoredHuman;
           end;
        5: SayCurrentLevels('woodcutting');
        6: PickUpMouse;
        7: WriteLn('No Antiban this round');
        8: begin
             GameTab(1 + Random(12));
             wait(4000+random(4000));
             GameTab(4);
           end;
        9: begin
             case random(8) of
               0: TypeSend('Fishing lvls?');
               1: TypeSend('Fishing levels');
               2: TypeSend('Woodcutting lvls');
               3: TypeSend('Wc levels');
               4: TypeSend('Exp till next level');
             end;
           end;
        10: MouseBox(MSX1,MMY1,MMX2,MMY2,3);
        11: WriteLn('No Antiban this round');
        12: SleepAndMoveMouse(400000+random(200000));
      end;
    end;

    procedure LoadTreeArray;
    begin
      WillowTree[0] := 1979698
      WriteLn('Willow Tree Array 1 loading...');
      wait(500);
      WriteLn('Sucessfull!!');

      WillowTree[1] := 2637622
      WriteLn('Willow Tree Array 2 loading...');
      wait(500);
      WriteLn('Sucessfull!!');

      WillowTree[2] := 1518369
      WriteLn('Willow Tree Array 3 loading...');
      wait(500);
      WriteLn('Sucessfull!!');

      WillowTree[3] := 1780784
      WriteLn('Willow Tree Array 4 loading...');
      wait(500);
      WriteLn('Sucessfull!!');

      WillowTree[4] := 3165781
      WriteLn('Willow Tree Array 5 loading...');
      wait(500);
      WriteLn('Sucessfull!!');

      WillowTree[4] := 2110778
      WriteLn('Willow Tree Array 6 loading...');
      wait(500);
      WriteLn('Sucessfull!!');
    end;


    Procedure Equipmentcheck;
    begin
      If(FindAxeBool)Then
        WriteLn('Hatchet Found');
    end;


    begin
    IntroText;
    end.



    compiles..
    Last edited by ian.; 04-22-2009 at 07:18 AM.

  6. #6
    Join Date
    Oct 2006
    Location
    H0M3
    Posts
    142
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Posting Permissions

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