Results 1 to 4 of 4

Thread: Error in my mining procedure

  1. #1
    Join Date
    Apr 2007
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Error in my mining procedure

    OK I have this strange error in my script: Line 1: [Error] (1:1): Variable Expected in script. and with help of Pentti we found out in which part of the script the error was. Here it is(DONT STEAL IT CUZ I WORKED HARD ON IT):
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/extended/xAutoTalk.scar}
    {.include SRL/SRL/extended/xAntiBan.scar}
    {.include SRL/SRL/skill/Mining.scar}

    var
    gx, gy: integer;


    const
    MineCoalTime = 5; //(Seconds)

    CoalColor1 = 432423;
    CoalColor2 = 432433223;
    CoalColor3 = 4544665423;
    CoalColor4 = 4398673;

    CoalTol1 = 1;
    CoalTol2 = 2;
    CoalTol3 = 3;
    CoalTol4 = 4;

    procedure CheckPick;
    begin
    if(FindPick)then
      begin
    //    if(FearlessDebug)then Writeln('Found pickaxe.');
      end else
      begin
        Writeln('Can''t Find(useable)Pick');
        Writeln('Switching to next player.');
        Players[CurrentPlayer].loc:= 'NoPick';
       // PlayerProgressReport;
        NextPlayer(False);
      end;
    end;

    procedure CheckFight;
    begin
      if(FindFight)then
      begin
        RunAwayDirection('N');
        wait(13000);
        RunBack;
        //FightsPlayer:= FightsPlayer+1;
        //FightsTotal:= FightsTotal+1;
      end;
    end;

    procedure CheckGas;
    begin
      if(GasColors(gx, gy))then
      begin
        //GassesPlayer:= GassesPlayer+1;
        //GassesTotal:= GassesTotal+1;
        Writeln('Gas found');
      end;
    end;

    function FindFastRandoms: Boolean; //Credits to: WT-Fakawi.
    var
      i: Integer;
    begin
      for i := 1 to 10 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := False;
          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;
          7: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          8: If RC Then
              Result := True;
          9: if FindTalk then
              Result := True;
          {10: If HandleTrade Then
               Result := True; }

        end;
        wait(1);
      end;
    end;

    procedure FckRandoms;
    begin
      FindNormalRandoms;
      FindFastRandoms;
    end;



    procedure MineCoal;
    var
    MCMark1, MCMark2: integer;
    tries: integer;
    begin
      Tries:= 0;
      repeat
      CheckFight;                                    //Fight
        if(FindObjOre2(x, y, 'ine', CoalColor1, CoalTol1, 4))or
          (FindObjOre2(x, y, 'ine', CoalColor2, CoalTol2, 4))or
          (FindObjOre2(x, y, 'ine', CoalColor3, CoalTol3, 4))or
          (FindObjOre2(x, y, 'ine', CoalColor4, CoalTol4, 4))then
         begin
           MMouse(x, y, 3, 3)
           CheckGas;                                 //Gas
           wait(50+random(100));
         end else
         begin
           Tries:= Tries+1;
         end;
      until(IsUpTextMulti('ine','ock','Mine'))or
           (Tries= 50)

      if(Tries= 50)then
      begin
        Writeln('Couldn''t find the Coal Ore.')
        Players[CurrentPlayer].loc:= 'Failed FindCoal'
      //  PlayerProgressReport;
        NextPlayer(False);
      end;

      if(IsUpTextMulti('ine','ock','Mine'))then
      begin
        if(Random(20) < 17)then
        begin
          Mouse(x, y, 0, 0, true);
          Flag;
          if(InChat('no ore curr'))then
          begin
            FckRandoms;
            MineCoal;
          end;
          MarkTime(MCMark1);
        end;
        repeat
          CheckGas;                                //Gas;
          CheckPick;
          wait(50);
          FckRandoms;                            //Anti-Randoms
          wait(50);
          CheckPick;                              //PickAxe
          wait(50);
          FindFight;                             //Fight;
         until(InChat('ou manage'))or
              (TimeFromMark(MCMark1 >= MineCoalTime*1000))
      end else
      begin
        Mouse(x, y, 0, 0, false);
        ChooseOption(x, y, 'Mine');
        Flag;
        if(InChat('no ore curr'))then
        begin
          FckRandoms;
          MineCoal;
        end;
        MarkTime(MCMark2);
        repeat
          CheckGas;                                //Gas;
          CheckPick;
          wait(50);
          FckRandoms;                            //Anti-Randoms
          wait(50);
          CheckPick;                              //PickAxe
          wait(50);
          FindFight;                             //Fight;
        until(InChat('ou manage'))or
             (TimeFromMark(MCMark2 >= MineCoalTime*1000))

        if(InChat('ou manage'))then
        begin
      //    if(FearlessDebug)then Writeln('Mined a Coal Ore');
          OresMinedPlayer:= OresMinedPlayer+1;
          OresMinedTotal:= OresMinedTotal+1;
        end;

        if(TimeFromMark(MCMark2) >= MineCoalTime*1000)then
        begin
          Writeln('It took to long to mine the Coal Ore.');
          Writeln('Switching to next player.');
          Players[CurrentPlayer].loc:= 'Failed MineCoal';
         // PlayerProgressReport;
          NextPlayer(False);
        end;
      end;
    end;

    begin
    MineCoal;
    end.
    I made of the part that didn't worked a small script and it gives the same error so it really is that part. Can someone fix the error??

    Thanks

  2. #2
    Join Date
    Apr 2007
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I figured out myself

  3. #3
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Glad to see you did that! Did you just forget something small?
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  4. #4
    Join Date
    May 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol good job
    you attempt to light a fire, you light the fire, you place the raw shrimp on the fire, you accidentally burn the shrimp. DAMMIT!

    Evil Walrus's will control the world someday...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. mining procedure
    By Nightmare0 in forum OSR Help
    Replies: 12
    Last Post: 03-27-2008, 04:22 AM
  2. Mining Procedure Help
    By massive630 in forum OSR Help
    Replies: 12
    Last Post: 01-13-2008, 02:54 PM
  3. Mining Procedure
    By stol3n in forum OSR Help
    Replies: 6
    Last Post: 04-03-2007, 07:09 AM
  4. Mining Procedure
    By ben123321 in forum OSR Help
    Replies: 9
    Last Post: 11-25-2006, 09:33 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
  •