Results 1 to 3 of 3

Thread: Identifier expected in script

  1. #1
    Join Date
    May 2008
    Location
    ;)
    Posts
    576
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Question Identifier expected in script

    Hey, i was working on a script, (which will hopefully be released soon, yay!) and after making a case for my anti-ban, i got this error:
    Line 76: [Error] (16833:1): Identifier expected in script

    Code:
    program AutoTalkerByNW;
    {.include srl\srl.scar}
    
    
    
    const
    {-----------------------------------------------------}
         Text1=('Pie: a delicious dessert and a mathamatiacl thingamabob.');
         Text2=('If pratice makes perfect, but nobodys perfect, why pratice?');
         text3=('Looking for something? check your left hand.');
    
    {-----------------------------------------------------}
    
    
    
    Procedure Talk;
    
    begin
         typesend(Text1);
         Wait(1000+random(200));
         typesend(Text2);
         if(not(LoggedIn))then
         Exit;
         Wait(750+random(200));
         typesend(Text3);
         Wait(1250+random(200));
    end;
    
    
    
         
    Procedure AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(10) of
       0:Begin
         HoverSkill('Ranged', false);
         wait(2453+Random(432));
         End;
         
              1:Begin
              FindNormalRandoms;
              End;
                      2:Begin
                      MakeCompass('N');
                      wait(100+random(133));
                      MakeCompass('S');
                      wait(50+random(133));
                      MakeCompass('N');
                      FindNormalRandoms;
                      End;
                            3:Begin
                            PickUpMouse;
                            End;
    End;
    
    
    
    
    Procedure SetChatToGame;
    Begin
         MoveMouseSplineEx(81, 490, 10, 10, 60, 30, 60);
         ClickMouse(81, 490, true);
    End;
    
    
    begin
    ActivateClient;
    setupsrl;
    SetChatToGame;
    Repeat
    Talk;
    AntiBan;
    until (false);
    end.
    what did i do and how do i fix it????

    --Thanks

  2. #2
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You forgot one end; in your anti-ban so it should look like this:
    SCAR Code:
    program AutoTalkerByNW;

    {.Include SRL\SRL.Scar}



    const
    {-----------------------------------------------------}
      Text1 = ('Pie: a delicious dessert and a mathamatiacl thingamabob.');
      Text2 = ('If pratice makes perfect, but nobodys perfect, why pratice?');
      text3 = ('Looking for something? check your left hand.');

    {-----------------------------------------------------}



    procedure Talk;
    begin
      TypeSend(Text1);
      Wait(1000 + random(200));
      TypeSend(Text2);
      if (not (LoggedIn)) then
        Exit;
      Wait(750 + random(200));
      TypeSend(Text3);
      Wait(1250 + random(200));
    end;




    procedure AntiBan;
    begin
      if (not (LoggedIn)) then
        Exit;
      FindNormalRandoms;
      case Random(10) of
        0: begin
            HoverSkill('Ranged', false);
            wait(2453 + Random(432));
          end;

        1: begin
            FindNormalRandoms;
          end;
        2: begin
            MakeCompass('N');
            wait(100 + random(133));
            MakeCompass('S');
            wait(50 + random(133));
            MakeCompass('N');
            FindNormalRandoms;
          end;
        3: begin
            PickUpMouse;
          end;
       end;
    end; // you forgot this



    procedure SetChatToGame;
    begin
      MoveMouseSplineEx(81, 490, 10, 10, 60, 30, 60);
      ClickMouse(81, 490, true);
    end;


    begin
      ActivateClient;
      setupsrl;
      SetChatToGame;
      repeat
        Talk;
        AntiBan;
      until (False);
    end.

  3. #3
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ohnoes! Use
    SCAR Code:
    Mouse(x, y, rx, ry : integer; left : boolean);
    to click the mouse and MMouse (without the left boolean) to move it.

    Also, those text constants do not need the ( and ). This does not change anything however if you do because it is a const. But if you had that in declaring a var or something it would cause something (var a : (a, b, c);.
    Just remove the ( and ) from them and you will be fine.

    Also, don't use an endless loop.
    SCAR Code:
    repeat
        //code
      until(false);
    Change the false to something else.

    SCAR Code:
    program AutoTalkerByNW;
    {.Include SRL\SRL.Scar}

    const
    {-----------------------------------------------------}
      Text1 = 'Pie: a delicious dessert and a mathamatiacl thingamabob.';
      Text2 = 'If pratice makes perfect, but nobodys perfect, why pratice?';
      text3 = 'Looking for something? check your left hand.';
      TimesToTalk = 20; //Set to 9999 if you want to keep going and just press the FKey.
      FKey = 11; //FKey to stop.
    {-----------------------------------------------------}

    var
      talked : integer;
     
    procedure Talk;
    begin
      TypeSend(Text1);
      Wait(1000 + random(200));
      TypeSend(Text2);
      if (not (LoggedIn)) then
        Exit;
      Wait(750 + random(200));
      TypeSend(Text3);
      Wait(1250 + random(200));
    end;




    procedure AntiBan;
    begin
      if (not (LoggedIn)) then
        Exit;
      FindNormalRandoms;
      case Random(10) of
        0 :
        begin
          HoverSkill('Ranged', false);
          wait(2453 + Random(432));
        end;
        2 :
        begin
          MakeCompass('N');
          wait(100 + random(133));
          MakeCompass('S');
          wait(50 + random(133));
          MakeCompass('N');
          FindNormalRandoms;
        end;
        3 : PickUpMouse;
      end;
    end;



    procedure SetChatToGame;
    begin
     Mouse(81, 490, 3, 3, true);
    end;


    begin
      ActivateClient;
      setupsrl;
      SetChatToGame;
      repeat
        Talk;
        AntiBan;
        inc(talked);
      until ((talked = TimesToTalk) or (IsFKeyDown(FKey)));
    end.
    Last edited by Da 0wner; 05-22-2009 at 05:01 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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