Results 1 to 8 of 8

Thread: Semi-colons

  1. #1
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Semi-colons

    Scar is telling me that there is a semi colon expected, and Im guessing its here:
    SCAR Code:
    procedure GetOres;
    begin
    //blah,blah,blah
    because before i added that, everything worked just fine. It gives me this error... so I can't tell what line...
    [Error] (15132:4): Semicolon (';') expected
    Could someone tell me how to fix it?

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

  3. #3
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Let me have a quick guess: Sometimes, SCAR moves the error a few lines below where it actually is. If you look at the previous procedure/function I'll almost bet it ends with
    SCAR Code:
    end
    instead of
    SCAR Code:
    end;

    -Knives

  4. #4
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @ king of knives... prob not, its the first procedure... actually, i just started on it... sorta.

    SCAR Code:
    program Smelt;
    {.include SRL/SRL.scar}
    var
       x, y: Integer;
       Iron: Integer;
       Coal: Integer;

    procedure GetOres;
    begin
      SetupSRL;
      OpenBankFast('feb');
      Wait(500+random(50))
      Iron := DTMFromString('78DA637CCBC0C0E0CB80027C0D5418FE03694' +
           '620FE0F048C6F800C2F54350EEA720C22503520C0F80A48F8A0AA' +
           '3153944455F31248F833A001465435EF814400A67B50D47C06124' +
           '1A86AAC55A451D53CC634A721C313D3CDE1A86A6AD33C50D40000' +
           'A571147C')
      if not FindDTM(Iron, x, y, 0, 0, 515, 334) then WriteLn('Iron not found');
      begin
        Mouse(x, y, 3, 3, False);
        Wait(1000+random(1000))
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('9');
        end else WriteLn('Withdraw X not found');
      end;
      Coal := DTMFromString('78DA63DCCFC0C0B0990105D8D96A31FC07D28' +
           'C40FC1F0818F701191B50D5989AAA30F043D5800023C89CAD98E6' +
           'A0A83904243632A001465435BB81C426541506068AA86A8E0289E' +
           'D04DCB319D35FA5F1CEA86A760189DDA86A2A125D50D40000C72F' +
           '161C');
      if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found')
      begin
        Mouse(x,y, 3, 3, False);
        Wait(400+random(300))
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('18');
        end else WriteLn('Withdraw X not found');
      end;
    end.

  5. #5
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh that... You can't end a procedure with
    SCAR Code:
    end.
    That is always for the end of the mainloop. You would have to do it this way:
    SCAR Code:
    Procedure GetOres;
    begin
     // Blablabla
    end;

    begin
      GetOres;
    end.
    That should definitely do it.

    -Knives

  6. #6
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program Smelt;
    {.include SRL/SRL.scar}
    var
       x, y, Iron, Coal: Integer;

    procedure GetOres;
    begin
      OpenBankFast('feb');
      Wait(500+random(50));
      if not FindDTM(Iron, x, y, 0, 0, 515, 334) then
      begin
      WriteLn('Iron not found');
      Exit;
     end;
      begin
        Mouse(x, y, 3, 3, False);
        Wait(1000+random(1000));
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('9');
        end else WriteLn('Withdraw X not found');
      end;

      if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found');
      begin
        Mouse(x,y, 3, 3, False);
        Wait(400+random(300))
        if ChooseOption('draw X') then
        begin
         Wait(600 + Random(1000));
         TypeSend('18');
        end else WriteLn('Withdraw X not found');
      end;
    end;

    Begin // This is your mainloop!
    SetupSRL;
      Iron := DTMFromString('78DA637CCBC0C0E0CB80027C0D5418FE03694' +
           '620FE0F048C6F800C2F54350EEA720C22503520C0F80A48F8A0AA' +
           '3153944455F31248F833A001465435EF814400A67B50D47C06124' +
           '1A86AAC55A451D53CC634A721C313D3CDE1A86A6AD33C50D40000' +
           'A571147C');
      Coal := DTMFromString('78DA63DCCFC0C0B0990105D8D96A31FC07D28' +
           'C40FC1F0818F701191B50D5989AAA30F043D5800023C89CAD98E6' +
           'A0A83904243632A001465435BB81C426541506068AA86A8E0289E' +
           'D04DCB319D35FA5F1CEA86A760189DDA86A2A125D50D40000C72F' +
           '161C');
    GetOres;
    end.

    Enjoy, look at the changes I've made. Remember you allways need a mainloop.

    Good luck!

  7. #7
    Join Date
    Dec 2007
    Location
    Florida... it sucks.
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ohhhhh... ok thanks a bunch

  8. #8
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Not at all PM if you get another problem.
    I'm a hawk at finding compiling errors Know 'em all from when I was new I could make EVERYTHING fuck up. Trust me.

    -Knives

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Semi Auto miner
    By EL_TYCHO in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 08-22-2008, 12:25 PM
  2. more semi pointless than semi stupid but...
    By cocodog13 in forum Semi Stupid Pictures
    Replies: 4
    Last Post: 04-03-2008, 04:33 PM
  3. Noob to semi-pro
    By Sir R. M8gic1an in forum Outdated Tutorials
    Replies: 5
    Last Post: 09-11-2007, 08:02 PM
  4. Fours Log Lighter (Semi Legit)
    By Fourscape in forum RS3 Outdated / Broken Scripts
    Replies: 11
    Last Post: 08-17-2007, 03:33 PM
  5. semi automatic script
    By EL_TYCHO in forum OSR Help
    Replies: 3
    Last Post: 07-26-2007, 08:22 PM

Posting Permissions

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