Results 1 to 7 of 7

Thread: Weird error.. wont compile..

  1. #1
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default Can't get script to compile [07] Quick please

    Simba Code:
    program LeDonsKhazardIronDepositor;

    {$I SRL/SRL.Simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$I P07Include.Simba}

    procedure MineIron;
    var x, y: integer;
    begin
     repeat
    if P07_FindObjCustom (x, y, ['ine', 'Mine'], [1581108, 1910852, 1778233], 5) Then
     begin
    ClickMouse2(mouse_left);
    Wait(RandomRange(400,2000))
    // until(P07_InvFull)
    end;
    begin
    MineIron;
    end.

    [Error] C:\Simba\Scripts\LeDonsKhazardIronDepositor.simba( 21:4): Identifier expected at line 20
    Compiling failed.

    Lol.. probably something extremely simple, but just can't figure it out.
    Last edited by Le_don; 02-27-2013 at 06:25 PM.

  2. #2
    Join Date
    Jan 2012
    Location
    Runescape News and General & Skill Guides
    Posts
    2,544
    Mentioned
    37 Post(s)
    Quoted
    545 Post(s)

  3. #3
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    the repeat needs a until....

  4. #4
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    the repeat needs a until....
    Thank you!

    When I un-comment // until(P07_InvFull) I get

    '[Error] C:\Simba\Scripts\LeDonsKhazardIronDepositor.simba( 16:1): Identifier expected at line 15
    Compiling failed.'

    I looked at some other similar scripts and couldn't spot a difference.

  5. #5
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Simba Code:
    procedure MineIron;
    var
      x, y: integer;
    begin
     repeat
       if P07_FindObjCustom (x, y, ['ine', 'Mine'], [1581108, 1910852, 1778233], 5) Then
       begin
         writeln('we found a rock!');
         mouse(x,y, randomrange(-5, 5), randomrange(-5, 5), mouse_left);
         Wait(RandomRange(400, 2000));
       end;
     until(P07_InvFull);
    end;

    begin
      MineIron;
    end.

    you were missing a end and had some in the wrong places, also you weren't moving the mouse just clicking it, i changed it to mouse which does both

  6. #6
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Simba Code:
    procedure MineIron;
    var
      x, y: integer;
    begin
     repeat
       if P07_FindObjCustom (x, y, ['ine', 'Mine'], [1581108, 1910852, 1778233], 5) Then
       begin
         writeln('we found a rock!');
         mouse(x,y, randomrange(-5, 5), randomrange(-5, 5), mouse_left);
         Wait(RandomRange(400, 2000));
       end;
     until(P07_InvFull);
    end;

    begin
      MineIron;
    end.

    you were missing a end and had some in the wrong places, also you weren't moving the mouse just clicking it, i changed it to mouse which does both
    Thanks a ton!

  7. #7
    Join Date
    Feb 2013
    Posts
    104
    Mentioned
    1 Post(s)
    Quoted
    32 Post(s)

    Default

    every begin needs an end, every until needs a repeat

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
  •