Results 1 to 2 of 2

Thread: Need help! Simple woodcut script

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

    Default Need help! Simple woodcut script

    Hello,

    I'm making my first script and I have been able to login etc and change the angels. I tried to get it to click a simple tree but it says compile error but I don't know where I have gone wrong? Can someone help me, I would really appreciate it.

    CODE BELOW:---------------------------------------------------------

    Simba Code:
    program scriptTemplate;

    {$DEFINE SMART}              // Always have this to load smart
    {$I SRL-6/SRL.simba}         // To load the SRL include files
    {$I SPS/lib/SPS-RS3.Simba}   // To load the SPS include files

    procedure declarePlayers();
    begin
      setLength(players, 1);
      with players[0] do
      begin
        loginName := 'alpha28rs@gmail.com';
        password := 'charlie2000';
        isActive := true;
        isMember := false;
      end
      currentPlayer := 0;
    end;

    // main loop
    begin
      clearDebug();               // Clear the debug box
      smartEnableDrawing := true; // So we can draw on SMART
      setupSRL();                   // Load the SRL include files
      declarePlayers();             // Set up your username/pass

      if not isLoggedIn() then             // If player isn't logged in then
      begin
        players[currentPlayer].login();   // Log them in
        exitTreasure();            // Exit treasure hunter
        Wait (randomRange(6000, 10000));
        mainScreen.setAngle(MS_ANGLE_HIGH);    // Make compass angle high
      end;

    end;

    //Start Cutting 'Tree's'
    procedure clickTree();
    var
      x, y: integer; //we need to declare these variables since findObject outputs/requires these
    begin
      if mainscreen.findObject(12.668, 18.496, 2849101, 22, ['ree'], MOUSE_RIGHT)
       [COLOR="#FF0000"] chooseOption.select(['hop down']) // This will choose ‘Chop down’ in chooseOptions menu[/COLOR]
      end;
    end;

    begin
      clearDebug();
      setupSRL();
      clickTree();
    end.

    //Once logged in starting to chop the tree's

    ERROR: Error: Operator expected at line 43
    Compiling failed.
    Last edited by Markus; 01-22-2017 at 09:00 PM.

  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

    Editted your posts to use [ simba ] tags for the code.

    YOu forgot the 'then' after the if-statement on line 43! Adding it should fix the compilation problem.
    I made a new script, check it out!.

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
  •