Results 1 to 10 of 10

Thread: Type mismatch at line 153

  1. #1
    Join Date
    Mar 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Type mismatch at line 153

    I've been following YoHoJo's tutorial #2 2/2 and when I compile I get this error:
    [Error] (154:42): Type mismatch at line 153

    I've checked everything a few times on the video and in my script and still get that error when I compile.

    Line 153 is:

    Code:
    MouseItem (LogPattern [I], False);

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

  3. #3
    Join Date
    Mar 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Replace False with 0
    So now instead of True and False it's 0 and 1?

    It works by the way, thank you,

  4. #4
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    too many spaces

    try this
    Simba Code:
    MouseItem(LogPattern[I], False);


    :S my bad didnt notice it was asking for a Click type
    Last edited by Mark; 04-21-2012 at 08:25 PM.

  5. #5
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by Spandzbab View Post
    So now instead of True and False it's 0 and 1?

    It works by the way, thank you,
    Either work.


    Quote Originally Posted by CRU1Z1N View Post
    too many spaces

    try this
    Simba Code:
    MouseItem(LogPattern[I], False);
    And spaces don't matter. As an example
    Simba Code:
    MoveMouse             (             100      ,    50        )     ;
    works just fine.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  6. #6
    Join Date
    Mar 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    Either work.


    And spaces don't matter. As an example
    Simba Code:
    MoveMouse             (             100      ,    50        )     ;
    works just fine.
    But I've had False before and it didn't compile but after I changed it to 0 it did. What's up with that ?

  7. #7
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    No idea. Just did some tests and sometimes one worked and the other didn't, and visa versa.
    Last edited by Rich; 04-21-2012 at 08:53 PM.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  8. #8
    Join Date
    Mar 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    @Edit@ Scratch that completely. New problem has occured.

    Whenever I run the script it goes to the top right corner of the Runescape screen and just waits there.

    I'll post the whole script so far maybe someone will find the problem while I experiment around with it.

    Code:
    program PowerChopper;
    
    //{$DEFINE SMART}
    {.include SRL\SRL.simba}
    {.Include SRL\SRL\Misc\Debug.simba}
    //{$i SRL\SRL\Misc\paintsmart.simba}
    
    
    Const
     SRLStats_Username = '';// Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     NumbOfPlayers= 1;     //How many players are you using
     StartPlayer=   0;     //Player to start auoting with! (0 means first char)
     BreakEvery        = 120;     //How Many Minutes To Break After
     BreakFor          = 10;      //How Long To Break For
     Version           = '1.0';
    
    
    
    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
    
      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
      end;
    
    end;
    
    
    
    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;
    
    
    Procedure Antiban;
    Begin
      Case Random(250) Of
    
        0:
        Begin
          //PaintReport;
          HoverSkill('Woodcut', False);
          //PaintReport;
          GameTab(Tab_Inv);
          //PaintReport;
        End;
        1:
        Begin
          //PaintReport;
          PickUpMouse;
          SleepAndMoveMouse(3000 + Random(500));
          //PaintReport;
          PickUpMouse;
        End;
        2: ExamineInv;
        3:
        Begin
          //PaintReport;
          RandomAngle(SRL_ANGLE_HIGH);
          //PaintReport;
          SetAngle(SRL_ANGLE_HIGH);
          //PaintReport;
        End;
        4:
        Begin
          //PaintReport;
          GameTab(Tab_Stats);
          //PaintReport;
          Wait(3000 + Random(500));
          //PaintReport;
          GameTab(Tab_Inv);
        End;
        5:
        Begin
          //PaintReport;
          HoverSkill('random', False);
          //PaintReport;
          GameTab(Tab_Inv);
        End;
    
      End;
    End;
    
    
    Procedure FailSafe (Reason:String);
    Begin
      Players[CurrentPlayer].Loc := Reason;
      Logout;
      Stats_Commit;
      //ProgressReport;
      TerminateScript;
    End;
    
    Function ChopDown:Boolean;
    Var
      X, Y, PlusOne, TreeCounter: Integer;
    Begin
      PlusOne:= InvCount+1;
      If FindObjTPA (x, y, 1252378, 10, 1, 15, 60, 3, ['Chop','Tree']) Then
      Begin
        StatsGuise ('We have found the tree');
        GetMousePos (x, y);
    
        Case Random(20) Of
        0: Mouse (x, y, 5, 5, True);
        1: Begin
            Mouse (x, y, 5, 5, False);
            WaitOption ('Chop', 500);
           End;
         End;
    
         Flag;
    
         Repeat
          Antiban;
          MarkTime (TreeCounter);
          Wait (1000);
          If InvCount=PlusOne Then
            StatsGuise ('We got one');
         Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)
    
      End;
    End;
    
    
    Procedure DropLogs;
    var
      X, Y, LogDTM, I:Integer;
      SlotBox:TBox;
      LogPattern: TIntegerArray;
    
    Begin
    
      LogDTM := DTMFromString('maQEAAHicE2RgYBBkgABmKM0KxJxALADEokAsBcRyUAxiSwKxOBALATEvELNBaRDmBmIRIBZDUicKFQOp5wNiDiS7mICYBYq9LRSgIuTjAAbKASMVMAYAACNQAx8=');
      LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
      For I:=0 To 27 Do
    
      Begin
    
        SlotBox:= InvBox(LogPattern[I]);
        If FindDTm(LogDTM, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
          Begin
            MouseItem (LogPattern[I], 0);
            ChooseOption ('Drop');
          End;
      End;
    
    End;
    
    
    Begin
    
      SetupSRL;
      DeclarePlayers;
      SetAngle(SRL_ANGLE_HIGH);
      Repeat
        ChopDown;
        If InvFull Then
          DropLogs;
      Until(false);
    
    End.
    Last edited by Spandzbab; 04-21-2012 at 09:16 PM.

  9. #9
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Most likely you need to fix your color

  10. #10
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Most likely you need to fix your color
    That and also work on your standards good habit to get into.

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
  •