Results 1 to 7 of 7

Thread: My scar program keeps coming up with identifier expected

  1. #1
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My scar program keeps coming up with identifier expected

    My Scar program keeps coming up with Line 150: [Error] (15652:5): Identifier expected in script.


    Line 150 (which is at the very end of the script) says :end.
    it keeps coming up with it when I try to run/compile the program, and I need to know how to get it working, i'm using scar 3.11(the only version that works on my computer)

  2. #2
    Join Date
    Jul 2007
    Location
    's-Gravenpolder, Holland
    Posts
    204
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add a
    SCAR Code:
    End;
    Above it and your problem will be fixed

    ~Sirpali

  3. #3
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried it, it came up with the same thing.

  4. #4
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Let's see, you didn't post the script: We can't help you. You're a leecher: I don't really wanna help you... but somebody probably will...

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

    Default

    Quote Originally Posted by bullzeye95 View Post
    Let's see, you didn't post the script: We can't help you. You're a leecher: I don't really wanna help you... but somebody probably will...
    Me to the rescue Someones got to help them learn


    Instead of adding another
    SCAR Code:
    end;
    like sirpali said. Remove that one and make
    SCAR Code:
    end.
    on line 150 into,
    SCAR Code:
    end;
    Because i am sure the script isn't only 150 lines long so it wont need a final end. Hope this helps. Also if this doesnt work, posting the script would be helpful.

    -Nitro

  6. #6
    Join Date
    Aug 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the script is 150 lines long, here, look.


    program MarnsSeersBSCollector;
    {.include SRL/SRL.scar}
    {.include SRL\SRL\Extended\xMapWalk.scar}
    {.include SRL\SRL\Extended\xBank.scar}

    var
    TreeOneColor, TreeTwoColor, TreeThreeColor, FlaxColor, LadderSymbol, TripsDone:Integer;

    Const StartPlayer = 0;
    TripsToDo = 100;
    Bowstrings = 28;
    Procedure DeclarePlayers;
    begin
    HowManyPlayers:=1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := StartPlayer;
    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Loc :='seers';
    Players[0].Active:=True;
    end;

    procedure Login;
    begin
    if(not(loggedin)) then LoginPlayer;
    end;

    procedure ToFlaxFeilds;
    begin
    TreeOneColor:=211999;
    TreeTwoColor:=610088;
    TreeThreeColor:=2645822;
    FlaxColor:=10638171;
    HighestAngle;
    MakeCompass('S');
    RadialWalk(TreeOneColor, 333, 389, 49, 0, 1);
    flag;
    writeln('Got To Tree One');
    RadialWalk(TreeTwoColor, 333, 389, 75, 0, 1);
    flag;
    writeln('Got To Tree Two');
    RadialWalk(TreeThreeColor, 718, 639, 75, 0, 1);
    flag;
    writeln('Got To Tree Three');
    MakeCompass('N');
    RadialWalk(FlaxColor, 74, 127, 44, 0, 1);
    flag;
    writeln('Got To Flax');
    repeat
    FindObj(x, y, 'Pick', 14999695, 10);
    Mouse(x, y , 1, 1, true);
    Findnormalrandoms;
    wait(1000+random(500));
    writeln('Picked A Flax');
    until (InvFull);
    writeln('Inventory Full');
    end;

    procedure SpinningRandoms;
    begin
    Findnormalrandoms;
    Mouse(290, 441, 5, 1, true); // To Take Care Of If You Gain A Level
    end;

    procedure ToSpinThisFlax;
    begin
    LadderSymbol:=6224;
    writeln('We Finished Getting Flax, Now We Go To Spin It');
    RadialWalk(FlaxColor, 253, 316, 75, 0, 1);
    flag;
    RadialWalk(TreeTwoColor, 284, 315, 75, 0, 1);
    flag;
    RadialWalk(TreeThreeColor, 303, 331, 70, 0, 1);
    flag;
    RadialWalk(LadderSymbol, 318, 403, 40, 0, 1);
    flag;
    repeat
    if (FindObj(x, y, 'Door', 2519700, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) or (FindObj(x, y, 'Door', 2520471, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) then
    begin
    if IsUpText('Open') then
    begin
    Mouse(x, y, 0, 0, False);
    Wait(500+Random(500));
    ChooseOption(x, y, 'Open');
    flag;
    end else Break;
    end;
    Wait(500+Random(500));
    until(false);
    MakeCompass('S');
    repeat
    FindObj3(x, y, 'Ladder' ,2642028, 8);
    Mouse(x, y, 1, 1, false);
    until PopUp('Climb-up');
    MakeCompass('N');
    repeat
    FindObj(x, y, 'Spin', 14013914, 5);
    Mouse(x, y, 5, 5, false);
    Findnormalrandoms;
    until ChooseOption(x,y,'Spin');
    flag;
    Mouse(271, 119, 5, 5, false);
    PopUp('Make X');
    wait(500+random(200));
    TypeSend('29');
    Findnormalrandoms;
    repeat
    wait(3000);
    SpinningRandoms;
    until IsChatMessage('out');
    end;

    procedure ToBank;
    begin
    MakeCompass('S');
    repeat
    FindObj3(x, y, 'Ladder',2642028, 8);
    Mouse(x, y, 5, 5, false);
    until PopUp('Climb-down');
    MakeCompass('N');
    repeat
    if (FindObj(x, y, 'Door', 2519700, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) or (FindObj(x, y, 'Door', 2520471, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) then
    begin
    if IsUpText('Open') then
    begin
    Mouse(x, y, 0, 0, False);
    Wait(500+Random(500));
    ChooseOption(x, y, 'Open');
    flag;
    end else Break;
    RadialWalk(FindRoadColor, 20, 46, 75, 0, 1);
    flag;
    RadialWalk(LadderSymbol, 12, 66, 45, 0, 1);
    flag;
    OpenBank3;
    DepositAll;
    CloseBank;
    TripsDone:=TripsDone+1;
    end;

    begin
    UnSafeDisguiseScar('Google...');
    SetupSRL;
    DeclarePlayers;
    Login;
    ToFlaxFeilds;
    ToSpinThisFlax;
    ToBank;
    end.

  7. #7
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use scar tags next time and learn some standards...

    SCAR Code:
    program MarnsSeersBSCollector;
    {.include SRL/SRL.scar}
    {.include SRL\SRL\Extended\xMapWalk.scar}
    {.include SRL\SRL\Extended\xBank.scar}

    var
    TreeOneColor, TreeTwoColor, TreeThreeColor, FlaxColor, LadderSymbol, TripsDone:Integer;

    Const StartPlayer = 0;
    TripsToDo = 100;
    Bowstrings = 28;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers:=1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := StartPlayer;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Loc :='seers';
      Players[0].Active:=True;
    end;

    procedure Login;
    begin
    if(not(loggedin)) then LoginPlayer;
    end;

    procedure ToFlaxFeilds;
    begin
      TreeOneColor:=211999;
      TreeTwoColor:=610088;
      TreeThreeColor:=2645822;
      FlaxColor:=10638171;
      HighestAngle;
      MakeCompass('S');
      RadialWalk(TreeOneColor, 333, 389, 49, 0, 1);
      flag;
      writeln('Got To Tree One');
      RadialWalk(TreeTwoColor, 333, 389, 75, 0, 1);
      flag;
      writeln('Got To Tree Two');
      RadialWalk(TreeThreeColor, 718, 639, 75, 0, 1);
      flag;
      writeln('Got To Tree Three');
      MakeCompass('N');
      RadialWalk(FlaxColor, 74, 127, 44, 0, 1);
      flag;
      writeln('Got To Flax');
      repeat
        FindObj(x, y, 'Pick', 14999695, 10);
        Mouse(x, y , 1, 1, true);
        Findnormalrandoms;
        wait(1000+random(500));
        writeln('Picked A Flax');
      until (InvFull);
    writeln('Inventory Full');
    end;

    procedure SpinningRandoms;
    begin
      Findnormalrandoms;
      Mouse(290, 441, 5, 1, true); // To Take Care Of If You Gain A Level
    end;

    procedure ToSpinThisFlax;
    begin
      LadderSymbol:=6224;
      writeln('We Finished Getting Flax, Now We Go To Spin It');
      RadialWalk(FlaxColor, 253, 316, 75, 0, 1);
      flag;
      RadialWalk(TreeTwoColor, 284, 315, 75, 0, 1);
      flag;
      RadialWalk(TreeThreeColor, 303, 331, 70, 0, 1);
      flag;
      RadialWalk(LadderSymbol, 318, 403, 40, 0, 1);
      flag;
      repeat
        if (FindObj(x, y, 'Door', 2519700, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) or (FindObj(x, y, 'Door', 2520471, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) then
        begin
          if IsUpText('Open') then
          begin
            Mouse(x, y, 0, 0, False);
            Wait(500+Random(500));
            ChooseOption(x, y, 'Open');
            flag;
          end else Break;
        end;
      Wait(500+Random(500));
      until(false);
    MakeCompass('S');
    repeat
      FindObj3(x, y, 'Ladder' ,2642028, 8);
      Mouse(x, y, 1, 1, false);
    until (PopUp('Climb-up'));  //forgot ( )
    MakeCompass('N');
    repeat
      FindObj(x, y, 'Spin', 14013914, 5);
      Mouse(x, y, 5, 5, false);
      Findnormalrandoms;
    until (ChooseOption(x,y,'Spin')); //forgot ( )
    flag;
    Mouse(271, 119, 5, 5, false);
    PopUp('Make X');
    wait(500+random(200));
    TypeSend('29');
    Findnormalrandoms;
    repeat
      wait(3000);
      SpinningRandoms;
    until (IsChatMessage('out')); //forgot ( )
    end;

    procedure ToBank;
    begin
      MakeCompass('S');
      repeat
        FindObj3(x, y, 'Ladder',2642028, 8);
        Mouse(x, y, 5, 5, false);
      until (PopUp('Climb-down'));
      MakeCompass('N');
      repeat
      if (FindObj(x, y, 'Door', 2519700, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) or (FindObj(x, y, 'Door', 2520471, 4)) or (FindObj(x, y, 'Door', 2652829, 4)) then
      begin
        if IsUpText('Open') then
        begin
          Mouse(x, y, 0, 0, False);
          Wait(500+Random(500));
          ChooseOption(x, y, 'Open');
         //flag;
        end;
      end;
      until(ChooseOption(x, y, 'Open'));
      begin
      RadialWalk(FindRoadColor, 20, 46, 75, 0, 1);
      flag;
      RadialWalk(LadderSymbol, 12, 66, 45, 0, 1);
      flag;
      OpenBank3;
      DepositAll;
      CloseBank;
      TripsDone:=TripsDone+1;
      end;
    end;

    begin
    UnSafeDisguiseScar('Google...');
    SetupSRL;
    DeclarePlayers;
    Login;
    ToFlaxFeilds;
    ToSpinThisFlax;
    ToBank;
    end.

    Hope this helps,
    ~Stupedspam

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 05-03-2008, 08:03 PM
  2. Identifier expected in script in scar 1.13
    By Rencuz in forum OSR Help
    Replies: 4
    Last Post: 11-05-2007, 08:32 PM
  3. Replies: 0
    Last Post: 09-24-2007, 10:16 PM
  4. Replies: 8
    Last Post: 04-09-2007, 12:21 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
  •