Results 1 to 9 of 9

Thread: How Can I Get This To Work?

  1. #1
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How Can I Get This To Work?

    I have this script:

    SCAR Code:
    {*******************************************************************************
    procedure CantLightHere;
    Description: Walks to another spot.
    *******************************************************************************}

    procedure CantLightHere;
    var VarrockRoads, x, y, Tries : Integer;
    begin
      Tries := 0;
      MakeCompass('N');
      repeat
        Tries := Tries + 1;
        Wait(100 + random(50));
      until(FindColorSpiral(x, y, VarrockRoads, MSX1, MSY1, MSX2, MSY2)) or (Tries > 10);
      if (Tries > 10) then
      begin
      Writeln('ERROR PROCEDURE CANTLIGHTHERE');
      TerminateScript;
      end;
      Mouse(x, y, 2, 2, True);
      Flag;
      LightAllLogs;                ////// ------------HERE IS THE PROBLEM
    end;

    {*******************************************************************************
    procedure LightAllLogs;
    Description: Lights ALL of our logs. =D
    *******************************************************************************}

    procedure LightAllLogs;
    var x, y : Integer;
    begin
      if(Not(CheckTinderBox)) then
      begin
        Writeln('NO TINDERBOX FOUND');
        TerminateScript;
      end;
      repeat
        if (CantLightCheck) then CantLightHere;       ////// ------------HERE IS THE PROBLEM
        Wait(50 + random(50));
        FindDTM(DTMLogs, x, y, MIX1, MIY1, MIX2, MIY2);
        Mouse(x, y, 0, 0, True);
        Wait(50 + random(50));
        FindDTM(DTMTinderbox, x, y, MIX1, MIY1, MIX2, MIY2);
        Mouse(x, y, 0, 0, True);
        Wait(MaxTimePerLog + random(MaxTimePerLogRandom));
      until(InventoryCount = 1);
    end;

    See, both these procedures call each other from within each other. Meaning they BOTH have to be on top of each other. Which doesn't make sense How can I get this to work?

    Thanks
    Pancakes
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  2. #2
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    procedure hello; forward;
    procedure hi;
    begin
      hello;
    end;

    procedure hello;
    begin
      Writeln('works');
    end;

    begin
      hi;
    end.


    so

    put this above CantLighthere procedure

    SCAR Code:
    procedure LightAllLogs; forward;

  3. #3
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    God dang it! Monkey beat me again!
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  4. #4
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Rofl. Don't worry, for a whole month, you won't have to deal with me
    Except those few pesty drop ins.

  5. #5
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the quick replies, expect my application for membership soon =D

    Pancakes.
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  6. #6
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay, I got that to work. Now I've got another (unrelated) problem on the same script.

    SCAR Code:
    repeat
          Wait(5);
          BlackChat := GetBlackChatMessage;
          Writeln(BlackChat);
          if (pos('atches', BlackChat) <> 0) then Break;
          if (CantLightCheck) then CantLightHere;
        until(ClickToContinue);

    returns in the debug box:
    SCAR Code:
    .i
    i        :i            :i
    i
    -
    -
    :i                  -    .i                       .             :i
    i        :i            :i
    i        :i            :i
    i        :i            :i
    i        :i            :i
    .                               :i      :i
    .                               :i      :i
    .                               :i      :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i
    .i  :i

    Any ideas?

    Thanks, once again.

    Pancakes
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  7. #7
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thought jagex bumped up the chatbox with there new update.. so it wouldn't work, and please stop pming people

    You'll have to set the new coords of the chatbox lines in the function.

  8. #8
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry... Wont PM anymore

    I knew I really shouldn't. Lol

    Listen to me, I sound like a kid. Haha

    Pancakes
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  9. #9
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Aren't the coords set in 3.81?
    You can't call a procedure that isn't declare yet.
    You have to tke out the lightalllogs from your cantlighthere.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how come this does not work?
    By takeout in forum OSR Help
    Replies: 3
    Last Post: 09-14-2007, 03:44 PM
  2. how come this does not work?
    By takeout in forum OSR Help
    Replies: 2
    Last Post: 09-11-2007, 09:19 PM
  3. Been Trying To Get This To Work : /
    By Speci in forum OSR Help
    Replies: 15
    Last Post: 07-21-2007, 12:17 PM
  4. how does rc work
    By del_signo in forum OSR Help
    Replies: 4
    Last Post: 05-10-2007, 02:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •