Results 1 to 3 of 3

Thread: Syntax error...

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

    Default Syntax error...

    helo i was wandering if any1 can help me plzZ?? i keep getting this error:

    Failed when compiling
    Line 119: [Error] (12783:27): Syntax error in script C:\Documents and Settings\Owner\My Documents\Grade 7\SCAR 3.15\Scripts\oredout(SMART).scar

    and this is my script:

    SCAR Code:
    program Miner;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}
     
    var x,y : integer;
     
    const
      SmartWorld      = 126;   //  what world smart uses
      Signed          = True;
     
      LoadsPerPlayer= 2;  // how many loads per player?
     
      rockcolor1= 5274794;  // 1 color of the rock
      rockcolor2= 4944798;  // 2nd color of the rock
      rockcolor3= 4879005;  // 3rd color of the rock
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name   := 'Username'; //Character Name
      Players[0].Pass   := 'Password'; //Character Pass
      Players[0].Nick   := 'nick'; //Nickname 3 - 4 Letter's of char name
      Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
    end;
     
    procedure Signature;
    begin
     ClearDebug;
     writeln(' BOH presents mine picker:');
     wait(250);
     writeln(' __________   _________    ___     ___ ');
     wait(250);
     wait(250);
     writeln('|   ____   | |         |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |  _____  |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | | |     | |  |   |___|   |');
     wait(250);
     writeln('|   _______| | |     | |  |    ___    |');
     wait(250);
     writeln('|   ____   | | |_____| |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |         |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | |_________|  |___|   |___|');
     wait(250);
     writeln('|__________| Made To Succeed!          ');
     wait(3000 + random(750));
    end;
     
    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;
     
    Procedure CheckLevel;
    Var
    Level: integer;
    Begin
     Level := GetSkillInfo('mining', false);
     Writeln('Current Level Is ' +IntToStr(Level));
    End;
     
     
    Procedure Myrandom;
    begin
      if(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Mining');
     
     
    end;
     
    procedure Antiban;
    begin
     if(not(LoggedIn)) then Exit;
      case Random(30) of
      1: RandomRClick;
      2: HoverSkill('Mining', False);
      3: RandomMovement;
      4: BoredHuman;
      5: AlmostLogout;
      6: DoEmote(400 + Random(90));
     end;
    end;
     
    procedure Minedarock;
     
    var x, y, Tries : integer;
     
    begin
     if(not(LoggedIn))then
      Exit;
      MakeCompass('N');
      SetAngle(True);
      if (not (FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 15)then
               begin
                 Logout;
                 Exit;
               end else
     
     
      if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7) then
      repeat
       case (Random(2)) of
     
        1:    Mouse(x,y,3,3,False,);
              ChooseOption('ine');
        2:    Mouse(x,y,3,3,True);
        Antiban;
        Myrandom;
        end;
       until (InvFull)
      end;
     
    end;
     
     
    procedure Drop;
    begin
      if Not(LoggedIn) then exit;
      CheckLevel;
     
      GameTab(4);
      for x := 2 to 28 do
      Begin
        if Random(101) < 3 then
        Begin
          MouseItem(x, true);
          MouseItem(x + 1, true);
        end;
        MouseItem(x, false);
        ChooseOption('rop');
      end;
    end;
     
    begin
      SetupSmart;
      SetupSRL;
      DeclarePlayers;
      if LoggedIn then Logout;
      LoginPlayer;
     repeat
      Minedarock;
       Drop;
       Antiban;
       Myrandom;
       Inc(Players[CurrentPlayer].Banked);
       if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
       begin
        NextPlayer(True);
       end;
      end;
      if not Loggedin then NextPlayer(False);
     
     until False;
    end.

  2. #2
    Join Date
    Jan 2008
    Location
    Alberta
    Posts
    727
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    In line 119 you put a comma at the end... also you forgot to use begin end; there also.

    Heres a working one.

    SCAR Code:
    program Miner;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}

    var x,y : integer;

    const
      SmartWorld      = 126;   //  what world smart uses
      Signed          = True;

      LoadsPerPlayer= 2;  // how many loads per player?

      rockcolor1= 5274794;  // 1 color of the rock
      rockcolor2= 4944798;  // 2nd color of the rock
      rockcolor3= 4879005;  // 3rd color of the rock

    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name   := 'Username'; //Character Name
      Players[0].Pass   := 'Password'; //Character Pass
      Players[0].Nick   := 'nick'; //Nickname 3 - 4 Letter's of char name
      Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
    end;

    procedure Signature;
    begin
     ClearDebug;
     writeln(' BOH presents mine picker:');
     wait(250);
     writeln(' __________   _________    ___     ___ ');
     wait(250);
     wait(250);
     writeln('|   ____   | |         |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |  _____  |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | | |     | |  |   |___|   |');
     wait(250);
     writeln('|   _______| | |     | |  |    ___    |');
     wait(250);
     writeln('|   ____   | | |_____| |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |         |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | |_________|  |___|   |___|');
     wait(250);
     writeln('|__________| Made To Succeed!          ');
     wait(3000 + random(750));
    end;

    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;

    Procedure CheckLevel;
    Var
    Level: integer;
    Begin
     Level := GetSkillInfo('mining', false);
     Writeln('Current Level Is ' +IntToStr(Level));
    End;


    Procedure Myrandom;
    begin
      if(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Mining');


    end;

    procedure Antiban;
    begin
     if(not(LoggedIn)) then Exit;
      case Random(30) of
      1: RandomRClick;
      2: HoverSkill('Mining', False);
      3: RandomMovement;
      4: BoredHuman;
      5: AlmostLogout;
      6: DoEmote(400 + Random(90));
     end;
    end;

    procedure Minedarock;

    var x, y, Tries : integer;

    begin
     if(not(LoggedIn))then
      Exit;
      MakeCompass('N');
      SetAngle(True);
      if (not (FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 15)then
               begin
                 Logout;
                 Exit;
               end else
               if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7) then
               repeat
                 case (Random(2)) of
                   0:     begin
                            Mouse(x, y, 3, 3, False);
                            ChooseOption('ine');
                          end;
                   1:    begin
                           Mouse(x, y, 3, 3, True);
                         end;
                 end;
                 AntiBan;
                 Myrandom;
               until (InvFull)
     end;



    procedure Drop;
    begin
      if Not(LoggedIn) then exit;
      CheckLevel;

      GameTab(4);
      for x := 2 to 28 do
      Begin
        if Random(101) < 3 then
        Begin
          MouseItem(x, true);
          MouseItem(x + 1, true);
        end;
        MouseItem(x, false);
        ChooseOption('rop');
      end;
    end;

    begin
      SetupSmart;
      SetupSRL;
      DeclarePlayers;
      if LoggedIn then Logout;
      LoginPlayer;
     repeat
      Minedarock;
       Drop;
       Antiban;
       Myrandom;
       Inc(Players[CurrentPlayer].Banked);
       if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
       begin
        NextPlayer(True);
       end;
      if not Loggedin then NextPlayer(False);
     until False;
    end.

    Work on your standards too.

  3. #3
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Iron man ftw View Post
    In line 119 you put a comma at the end... also you forgot to use begin end; there also.

    Heres a working one.

    SCAR Code:
    program Miner;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}

    var x,y : integer;

    const
      SmartWorld      = 126;   //  what world smart uses
      Signed          = True;

      LoadsPerPlayer= 2;  // how many loads per player?

      rockcolor1= 5274794;  // 1 color of the rock
      rockcolor2= 4944798;  // 2nd color of the rock
      rockcolor3= 4879005;  // 3rd color of the rock

    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name   := 'Username'; //Character Name
      Players[0].Pass   := 'Password'; //Character Pass
      Players[0].Nick   := 'nick'; //Nickname 3 - 4 Letter's of char name
      Players[0].Active := True; //true if you want this player to be ran in the script false if you dont want it to run
    end;

    procedure Signature;
    begin
     ClearDebug;
     writeln(' BOH presents mine picker:');
     wait(250);
     writeln(' __________   _________    ___     ___ ');
     wait(250);
     wait(250);
     writeln('|   ____   | |         |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |  _____  |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | | |     | |  |   |___|   |');
     wait(250);
     writeln('|   _______| | |     | |  |    ___    |');
     wait(250);
     writeln('|   ____   | | |_____| |  |   |   |   |');
     wait(250);
     writeln('|  |    |  | |         |  |   |   |   |');
     wait(250);
     writeln('|  |____|  | |_________|  |___|   |___|');
     wait(250);
     writeln('|__________| Made To Succeed!          ');
     wait(3000 + random(750));
    end;

    procedure SetupSmart;
    begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;

    Procedure CheckLevel;
    Var
    Level: integer;
    Begin
     Level := GetSkillInfo('mining', false);
     Writeln('Current Level Is ' +IntToStr(Level));
    End;


    Procedure Myrandom;
    begin
      if(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Mining');


    end;

    procedure Antiban;
    begin
     if(not(LoggedIn)) then Exit;
      case Random(30) of
      1: RandomRClick;
      2: HoverSkill('Mining', False);
      3: RandomMovement;
      4: BoredHuman;
      5: AlmostLogout;
      6: DoEmote(400 + Random(90));
     end;
    end;

    procedure Minedarock;

    var x, y, Tries : integer;

    begin
     if(not(LoggedIn))then
      Exit;
      MakeCompass('N');
      SetAngle(True);
      if (not (FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 15)then
               begin
                 Logout;
                 Exit;
               end else
               if FindObjCustom(x, y, ['Min', 'ine'], [rockcolor1, rockcolor2, rockcolor3], 7) then
               repeat
                 case (Random(2)) of
                   0:     begin
                            Mouse(x, y, 3, 3, False);
                            ChooseOption('ine');
                          end;
                   1:    begin
                           Mouse(x, y, 3, 3, True);
                         end;
                 end;
                 AntiBan;
                 Myrandom;
               until (InvFull)
     end;



    procedure Drop;
    begin
      if Not(LoggedIn) then exit;
      CheckLevel;

      GameTab(4);
      for x := 2 to 28 do
      Begin
        if Random(101) < 3 then
        Begin
          MouseItem(x, true);
          MouseItem(x + 1, true);
        end;
        MouseItem(x, false);
        ChooseOption('rop');
      end;
    end;

    begin
      SetupSmart;
      SetupSRL;
      DeclarePlayers;
      if LoggedIn then Logout;
      LoginPlayer;
     repeat
      Minedarock;
       Drop;
       Antiban;
       Myrandom;
       Inc(Players[CurrentPlayer].Banked);
       if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
       begin
        NextPlayer(True);
       end;
      if not Loggedin then NextPlayer(False);
     until False;
    end.

    Work on your standards too.
    thankss =)) repped..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Syntax error(need help.)
    By weequ in forum OSR Help
    Replies: 9
    Last Post: 04-04-2008, 04:54 AM
  3. Replies: 5
    Last Post: 02-26-2008, 04:14 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
  •