Results 1 to 5 of 5

Thread: Mismatch Error; Assistance Needed!

  1. #1
    Join Date
    Jan 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation Mismatch Error; Assistance Needed!

    I have highlighted in ORANGE, the mismatch error that I am getting. The error is under the code, isolated for convenience.

    Ignore the comments I have made in the script; they are for personal notes as I learn.

    Specific debug box error:
    Code:
    [Hint] (49:10): Variable 'Result' never used at line 48
    [Error] (101:41): Type mismatch at line 100
    Compiling failed.
    Simba Code:
    program powerchopper;
    //{$DEFINE SMART}
    {$i SRL/SRL.simba}



    Const
      NumbOfPlayers= 1;
      StartPlayer= 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'] ;
      With Players[0] do
      begin
        Name := ''; //Character Name
        Pass := ''; //Character Pass
        Active := True; //True if you want this player to be ran in the script, false if not
      End;
    End;
    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;
    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcutting', false); Gametab(28); End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
        2: Begin StatsGuise('AntiBan') RandomAngle(1); 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;
      X:=MSCX;       //these tell FindObjTPA to search from Main screen centre x and y and
      Y:=MSCY;       //spiral out searching for whatever FindObjTPA declares
      If FindObjTPA(X, Y, 4083292, 10, 1, 15, 60, 600, ['Cho']) Then
      Begin
      StatsGuise('Tree Found!');
      GetMousePos(X, Y);

      Case Random(2) Of        //Random(2) because it will create 2 randomness, 0 and 1
      0: Mouse(X, Y, 5, 5, True); //Left click
      1: Begin
            Mouse(X, Y, 5, 5, False); //Right click
            WaitOption('Chop', 500); //Waits for chop to appear or waits 500ms
            End;
        End;  //case needs an end

        Flag;

        Repeat
          StatsGuise('Antiban and Waiting');
          MarkTime(TreeCounter);    //acts as a stopwatch
          Antiban;
          Wait(1000);
        If InvCount=PlusOne Then
          WriteLn('We got one');
        Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7500)    //TimeFromMark means how long since marktime began

      End;
    End;

    Procedure DropLogs;
    var
      X, Y, LogDTM, I:Integer;
      SlotBox:TBox;
      LogPattern:TIntegerArray;


    Begin;

        LogDTM := DTMFromString('mggAAAHicY2NgYJBjY2DQBGJ1IDYFYisgNgfiaiYGhlwgbgTiLCCuAeJCIO7Mt2VwtzdmSPLSAepmYnAxkQPT/xmwA0YcGAIAuH4IcA==');
        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];
        StatsGuise('Dropping Logs');
        For I:=0 To 27 Do //For loop repeats itself for a declared time
                          //In this case, for every inventory slot
        Begin
          SlotBox:=InvBox(LogPattern[I]);    //InvBox means box around an inventory spot
          If FindDTM(LogDTM,X,Y,SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
          Begin
              MouseItem(LogPattern[I],False);
              ChooseOption('Dro');
         End;
    End;



    Begin

      SetupSRL;
      DeclarePlayers;
      Repeat
          ChopDown;
          If InvFull Then
            DropLogs;
      Until(false);


    End.
    MouseItem(LogPattern[I],False);

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    MouseItem(LogPattern[I],False); -> MouseItem(LogPattern[I], mouse_Right);
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Jan 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    MouseItem(LogPattern[I],False); -> MouseItem(LogPattern[I], mouse_Right);
    This has worked, but now I am getting an additional error:
    Code:
    [Hint] (49:10): Variable 'Result' never used at line 48
    [Error] (119:4): Identifier expected at line 118
    Compiling failed.
    Line 118 is as follows:
    Simba Code:
    End.

  4. #4
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    DropLogs procedure needs one more end;
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  5. #5
    Join Date
    Jan 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    DropLogs procedure needs one more end;
    Thanks. I was looking at the end of the script looking for a place to put an End;

    Thanks again.

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
  •