Results 1 to 6 of 6

Thread: Compiler error

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

    Default Compiler error

    I'm new to Pascal and everything, but I'm interested in learning so I've been trying to make a simple woodcutting script that burns the logs afterwards, and I'm stuck at the point of chopping the tree..
    Code:
    procedure ChopTree;
      var x, y: integer;
      begin
         repeat
         //function FindObj(var cx, cy: Integer; Text: string; Color, Tol: Integer): Boolean;
           if FindObj(x, y, 'hop', 3490885, 21) then
           Mouse(x, y, 3, 3, false);
           ChooseOptions('hop');
           repeat
            Wait(1200+random(350));
            Until not IsUpText('ow') or (InvFull);
          until(InvFull);
        end;
    ^and when I try to compile that, I keep getting this error
    Code:
    [Error] (33:8): Unknown identifier 'ChooseOptions' at line 32
    So if someone could just kind of point me in the right direction to help me, it'd be greatly appreciated! Thanks in advance.

  2. #2
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Simba Code:
    ChooseOption('hop');

    No S on the end, for future reference if you go to the includes folder there is everything you really need in there. Or you can hit control and click and it will pull up the correct includes file.

  3. #3
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    FYI Using WaitOption will be better in case of a laggy connection than ChooseOption

  4. #4
    Join Date
    Mar 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the feedback, definitely appreciated!

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

    Default

    I know double posting is frowned upon, but I'm stuck again.. I'm sorry, but I'm on my last leg again haha.

    Code:
      procedure MouseItem(28; true);
          begin
             if (ExistsItem(28)) then
             InvMouse(1, 2);
      end;
    That bit of code is giving me this error:

    Code:
    [Error] (39:13): Duplicate identifier 'MOUSEITEM' at line 38
    I'm trying to make a script to where it chops willow logs, and then burns one so that I can bonfire the rest of them (and yes, this is my first script.).

  6. #6
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    MouseItem is a SRL function so you can't name the procedure MouseItem. Also you can edit your post instead of double posting

    Simba Code:
    procedure StartFire; // This will start the fire
    begin
      InvMouse(28, 3);
      if IsUpText('og') then
      begin
        ClickMouse2(False);
        WaitOption('ight', 200);
      end;
    end;

    Use that to start a fire then add another procedure to start adding to bonfire or incorporate it in there
    Last edited by Gucci; 06-13-2012 at 07:53 PM.
    Current Project: Retired

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
  •