Results 1 to 5 of 5

Thread: What is the problem?

  1. #1
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default What is the problem?

    Line 64: [Error] (14745:1): Syntax error in script

    What am I doing wrong?

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    var HowLoads: integer;
    const
      WhatBar   = 'Bronze';
      WhatSmith = 'Dagger';
      LoadsDo   = 1;
    procedure OpenBankDeposit(FirstSlot, EndSlot: integer);
    var
      x, y: integer;
    begin
      repeat
        FindObjCustom(x, y, ['Use', 'B', 'U'], [1390918, 3223861], 4);
        Mouse(x,y,1,1,false);
        ChooseOption('quic');
        Wait(1500+random(125));
      until(BankScreen);
      if BankScreen then
      begin
        Deposit(FirstSlot, EndSlot, 1);
      end;
      CloseBank;
    end;

    procedure GoToBank;
    var x, y, rx, ry: integer;
    begin
      SymbolAccuracy := 0.5;
      FindSymbol(x, y, 'bank');
      Mouse(x, y, 1, 1, true);
      Flag;
      OpenBankDeposit(2, 28);
      FindSymbol(rx, ry, 'anvil');
      Mouse(rx, ry, 1, 1, true);
      Flag;
    end;

    procedure DoSmith;
    var cx, cy, DTM, dx, dy: integer;
    begin
      case WhatBar of
      'Bronze': begin
        DTM := DTMFromString('78DA63E46661606065624006767A92609A11C' +
           'A6704A9114555039385ABF9C7CCC0C04F408D38D01C6E026A3881' +
           '6A18F1AB0100FB81021A');
        FindDTM(DTM, cx, cy, 615, 228, 603, 228);
        Mouse(cx, cy, 1, 1, true);
        FindObj(dx, dy, 'Anvil', 3223861, 4);
        Mouse(dx, dy, 1, 1, true);
        Wait(7000+random(200));
        case WhatSmith of
        'Dagger': begin
          Mouse(49, 82, 1, 1, false);
          ChooseOption('All');
          GoToBank;
        end;
        'Sword': begin
          Mouse(171, 133, 1, 1, false);
          ChooseOption('All');
          GoToBank;
        end;
      end;
    end;
    begin
      ActivateClient;
      Wait(1000);
      repeat
        DoSmith;
        HowLoads := HowLoads+1;
      until(HowLoads = LoadsDo);
    end.

    Cut em2 it
    Formerly known as Cut em2 it

  2. #2
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    Well I forget what a syntax error is caused by, so ill edit in sec. But you didnt free your DTM, dont know if you really need to or not but i think you do.

    EDIT: didnt see anything else wrong with it you might try to put a space between that last procedure and your main loop.
    Back from the dead.....

  3. #3
    Join Date
    Jun 2007
    Posts
    246
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your missing two ends, remember all cases require an end so number of cases + number of begins should be equal to number of ends

  4. #4
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Ahh, I see the problem. Thanks mate!
    Formerly known as Cut em2 it

  5. #5
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just as tip you need alot more If statements, you havbe to check that what you are doing is going right so that you dont end up clicking all over the place at the wrong time.

    And To save yourself some time, you should work out the coords of the smithing table so that usign 1 command and a number you can do any weapon rather than doing a different procedure for each one... PM me if you want help
    The truth finally came out...


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. problem...
    By Blumblebee in forum OSR Help
    Replies: 4
    Last Post: 12-28-2008, 07:22 AM
  2. help big problem
    By goblanca in forum OSR Help
    Replies: 3
    Last Post: 05-19-2007, 10:41 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
  •