Results 1 to 5 of 5

Thread: Another error...

  1. #1
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default Another error...

    Getting this wierd error...
    Anyone know how to fix it?

    Error] (433:65): 'THEN' expected at line 432

    Simba Code:
    procedure MainLoop;
    begin
         repeat
               GameTab(Tab_Inv);
         if (not FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
            begin
           CreateGateStone;
             DropGateStone;
             HomeTeleport;
              TradeSmuggler;
              BuyMagebanes;
              UseTheGatestone;
              end else
    //THIS FindDTM lights orange.
               if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
        begin

            GameTab(Tab_Inv);
           ClickMagebane;
    I was away for a long time, but i'm back!

  2. #2
    Join Date
    May 2008
    Location
    ;)
    Posts
    576
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then

    should be

    if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2) then

    You had two ')'s at then end of the finddtm

  3. #3
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Removed the ).
    Now getting:

    This is the last thing before i can release my DungFarmer with smuggler support.

    [Error] (424:65): Closing parenthesis expected at line 423

    Edit:

    Removed ). now until(false); light up... wtf..

    My full MainLoop:

    Simba Code:
    procedure MainLoop;
    begin
         repeat
               GameTab(Tab_Inv);
         if (not FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
            begin
           CreateGateStone;
             DropGateStone;
             HomeTeleport;
              TradeSmuggler;
              BuyMagebanes;
              UseTheGatestone;
              end else
               if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin

            GameTab(Tab_Inv);
           ClickMagebane;
          UseOnFarming;
            wait(randomrange(2000,2100));
             AntiBan;
                wait(randomrange(1000,1100));
                ClearDebug; //ADDED CLEAR DEBUG
                wait(randomrange(200,300));
              ProgressReport;
              wait(randomrange(1000,1100));
           HarvestPatch;

         CleaningHerbs;

        repeat
           HighAlchItem;
           wait(randomrange(400,500));
            AlchingTheHerbs;


    until (not FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2));
    FreeDTM(HighAlchDTM);
    FreeDTM(CleanHerbDTM);
     AntiBan;
     GameTab(Tab_Inv);
           until(false);
          end;
    Last edited by bas; 04-30-2012 at 10:34 AM.
    I was away for a long time, but i'm back!

  4. #4
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Work on your standards :P
    This should work
    Simba Code:
    procedure MainLoop;
    var
      X, Y, MagebaneDTM, CleanHerbDTM, HighAlchDTM: Integer;

    begin
      repeat
        begin
          GameTab(Tab_Inv);
          if not(FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
            begin
              //CreateGateStone;
              //DropGateStone;
              //HomeTeleport;
              //TradeSmuggler;
              //BuyMagebanes;
              //UseTheGatestone;
            end else
              if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                begin
                  GameTab(Tab_Inv);
                  //ClickMagebane;
                  //UseOnFarming;
                  Wait(RandomRange(2000, 2100));
                  //AntiBan;
                  Wait(Randomrange(1000, 1100));
                  ClearDebug; //ADDED CLEAR DEBUG
                  Wait(RandomRange(200, 300));
                  //ProgressReport;
                  Wait(RandomRange(1000, 1100));
                  //HarvestPatch;
                  //CleaningHerbs;
                    repeat
                      //HighAlchItem;
                      Wait(RandomRange(400, 500));
                      //AlchingTheHerbs;
                  until not(FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2));
                end;
          FreeDTM(HighAlchDTM);
          FreeDTM(CleanHerbDTM);
          //AntiBan;
          GameTab(Tab_Inv);
        end;
      until(False);
    end;
    Remove the //'s

    Oh yeah, it didn't work because you forgot to place and end; somewhere.

    Script source code available here: Github

  5. #5
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by J J View Post
    Work on your standards :P
    This should work
    Simba Code:
    procedure MainLoop;
    var
      X, Y, MagebaneDTM, CleanHerbDTM, HighAlchDTM: Integer;

    begin
      repeat
        begin
          GameTab(Tab_Inv);
          if not(FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
            begin
              //CreateGateStone;
              //DropGateStone;
              //HomeTeleport;
              //TradeSmuggler;
              //BuyMagebanes;
              //UseTheGatestone;
            end else
              if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                begin
                  GameTab(Tab_Inv);
                  //ClickMagebane;
                  //UseOnFarming;
                  Wait(RandomRange(2000, 2100));
                  //AntiBan;
                  Wait(Randomrange(1000, 1100));
                  ClearDebug; //ADDED CLEAR DEBUG
                  Wait(RandomRange(200, 300));
                  //ProgressReport;
                  Wait(RandomRange(1000, 1100));
                  //HarvestPatch;
                  //CleaningHerbs;
                    repeat
                      //HighAlchItem;
                      Wait(RandomRange(400, 500));
                      //AlchingTheHerbs;
                  until not(FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2));
                end;
          FreeDTM(HighAlchDTM);
          FreeDTM(CleanHerbDTM);
          //AntiBan;
          GameTab(Tab_Inv);
        end;
      until(False);
    end;
    Remove the //'s

    Oh yeah, it didn't work because you forgot to place and end; somewhere.
    This fixed it!
    Thank you very much hope i can it runs great now and i can release to public to help the community!
    I was away for a long time, but i'm back!

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
  •