Results 1 to 4 of 4

Thread: Compiling help

  1. #1
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Compiling help

    Ok i have just finished my first script (which is for a private server) and i have no idea what i am doing wrong with the compiling. It is a woodcutter to firemaker script.
    Simba Code:
    program WCandFM;
    {$i SRL/SRL.simba}

    var
      x,y:Integer;

    const
     TreeColour = 22664;
     TreeColourTolerance = 3;
     StumpColour = 4489384;

    procedure AntiBan;
    begin
     Case Random (2500) of
        0..18: Begin SleepAndMoveMouse(5000 + Random(750)); End;
        19..24: Begin RandomRClick; End;
        25..42: Begin PickUpMouse; End;
        43..48: Begin MissMouse(100,100); End;
        49..54: Begin RandomRClick; End;
        55..60: Begin PickUpMouse; End;
        61..66: Begin RandomMovement; End;
        67..72: Begin BoredHuman; End;
        73..78: Begin RandomRClick; End;
        End;
     end;

     procedure ChopTree
     begin
      repeat
           if FindColorSpiralTolerance(x, y, TreeColour, 0, 0, 515, 337,  TreeColourTolerance) then //finding and clicking the tree
           writeln('Found tree and chopping it down.');
           Mouse (x ,y ,0 , 0, True);
           repeat
           Wait(RandomRange(2000, 3000)) //antiban stuff (though I might not really need, its good practise)
           AntiBan;
           Until not(FindColorSpiralTolerance(x, y, 3436712, 0, 0, 515, 337, 2) or (FindColorSpiralTolerance (x, y, 3029313, 653, 438, 669, 449, 20)) = False //detects fallen tree and/or full inventory
           until not (FindColorSpiralTolerance (x, y, 3029313, 653, 438, 669, 449, 20); //detects full inventory
           Writeln('Full inventory, starting to firemake.');
          end;

    Procedure Firemake;
    begin
    repeat
    Mouse(706, 444, 10, 10, True); //clicking tinderbox
    wait (300+Random(100));
    Mouse(663, 444, 10, 10, True); //clicking log
    wait (1700+Random(100));
    until (FindColorSpiralTolerance (x, y, 3029313, 653, 438, 669, 449, 20));
    Writeln('Finished lighting all the logs)
    end;

    procedure main;
    begin
      repeat
        ChopTree;
        Firemake;
      until(false);
    end;

    begin
      ClearDebug;
      SetUpSrl;
      ActivateClient;
      main;
    end.
    so does anybody know what im doing wrong? sorry if its a simple answer, i have never really finished reading the tuts that i need to read. most my learning comes from reading others' scripts and from the help of this community.
    Last edited by zluo; 04-18-2012 at 08:39 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    missing a ' at the end of the writeln in procedure Firemake;
    I made a new script, check it out!.

  3. #3
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah crap thanks, and also just noticed there was no semicolon after procedure choptree.

  4. #4
    Join Date
    Jul 2009
    Location
    Australia
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    You're also missing a ; after (Line 27)
    Simba Code:
    procedure ChopTree
    A second ) after (line 36)
    Simba Code:
    Until not(FindColorSpiralTolerance(x, y, 3436712, 0, 0, 515, 337, 2)
    Same as above on line 37.
    Missing a ' at the end of (line 49)
    Simba Code:
    Writeln('Finished lighting all the logs)

    ~Caotom

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
  •