Results 1 to 7 of 7

Thread: Identifier exected and just an overlook

  1. #1
    Join Date
    Oct 2007
    Location
    Michigan
    Posts
    557
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Identifier exected and just an overlook

    Well I am coming up with the error:

    Line 69: [Error] {15097:16) Identifier expected in script

    I've tried going through it a few times to see what was wrong and I haven't been able to put my finger on it.

    I've searched on the forums and haven't had any luck yet.

    So here is my script so far, its simple and it uses the basics with a bit more I've picked up from other scripts. It's not really anything special but I am trying.

    -----------------------------------------------------------------------------

    //************************************************** *************************//
    //****************Set your desktop to True 32 bit high color*****************//
    //****************Set your game to the highest brightness low detail*********//

    program New;
    {.include SRL/SRL.scar}

    var
    TreeColor: array[0..1] of integer;
    const
    LoadsPerPlayer = 10; //Numer of backpacks full of logs before the next player
    WaitPerTree = 5000; //the time to wait while we are chopping trees
    TreeColor0= 2182984;
    TreeColor1= 2705214;
    MySRLID = ''; //enter your SRLID here
    MySRLPasssword = ''; //enter your SRL Password here
    VersionNumber = '0.01';
    Debanme = 10;
    procedure DeclarePlayers;
    begin

    NumberOfPlayers(1);
    CurrentPlayer := 0;

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

    //Copy and past the above Players array and replace the [0] with the
    //the next number the player is..I.E Players[1] .Name :='';

    end;


    procedure ChopTree;
    var
    x, y, MyMark : integer;
    begin
    if not Loggedin then Exit;
    MarkTime(MyMark);
    repeat
    if FindObj(x, y, 'ree', TreeColor0, 30) then
    begin
    Mouse(x, y, 0, 0, False);
    if ChooseOption('ree') then
    begin
    //increase 1 to the total tree chop - if we had one
    Wait(WaitPerTree);
    Exit; //We clicked chop, now we can exit this procedure.
    end;
    end;

    if TimeFromMark(MyMark) > (2 * 60 * 100) then
    begin
    Logout;
    Exit;
    end;
    until false

    end;

    procedure Randoms;
    begin
    Findnormalrandoms;
    end;
    procedure Antibanactions;
    begin

    //this is where the problem is at
    Antibanactions := Random(10)
    Case Antibanactions of
    0: RandomRClickEvery(2+Random(13));
    1: HoverSkill9'Mining',False);
    2: RandomChatEvery(10+Random(5));
    3: RotateEvery(20+Random(10));
    4: LeaveScreenEvery(5 + Random(5));
    5: HoverEvery(15 + Random(5), 'Attack');
    6: PickUpMouse;
    7: BoredEvery(9 + Random(24));
    8: DragItem(1, 1 + Random(18));
    9: GameTab(1 + Random(12));
    10: RotateEvery(7 + random(4));
    end;

    Procedure ProgressReport;

    begin
    writeln(' ');
    WriteLn('<============-'+VersionNumber+'- Progress Report ==============>');
    writeln('Worked for '+ TimeRunning);
    PlayerStats;
    SRLRandomsReport;
    SendSRLReport;
    end;

    begin
    SetupSRL;
    SRLID := MySRLID;
    SRLPassword := MySRLPassword;
    DeclarePlayers;
    Randoms;
    Findnormalrandoms;
    Debanme;
    if Loggedin then Logout;
    LoginPlayer;
    repeat
    ChopTree;
    if InvFull then
    begin
    DropTopPosition(2, 28);
    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
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure Antibanactions;
    begin

    //this is where the problem is at
    Antibanactions := Random(10)

    Cant have a variable named the same as a procedure.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Oct 2007
    Location
    Michigan
    Posts
    557
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    procedure Antiban;
    begin
    Antibanme := Random(10)
    Case Antibanme of
    0: RandomRClickEvery(2+Random(13));
    1: HoverSkill9'Mining',False);
    2: RandomChatEvery(10+Random(5));
    3: RotateEvery(20+Random(10));
    4: LeaveScreenEvery(5 + Random(5));
    5: HoverEvery(15 + Random(5), 'Attack');
    6: PickUpMouse;
    7: BoredEvery(9 + Random(24));
    8: DragItem(1, 1 + Random(18));
    9: GameTab(1 + Random(12));
    10: RotateEvery(7 + random(4));
    end;

    Well thats what I changed it to so it wouldn't have the same name and it is still giving me the same error.

  4. #4
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Rogeruk, its not that.


    Your ChopTree procedure is missing an Until

    EDIT: Next time please use SCAR tags and standards, so we can look at your code next time

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

    Default

    Actually it's not missing an until. He hasn't declared the variable AntiBanMe as an Integer (or at all) so that's throwing errors.

    EDIT: And then after that you have a lot of xAntiBan functions, which aren't in SRL anymore.
    :-)

  6. #6
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    Rogeruk, its not that.


    Your ChopTree procedure is missing an Until

    EDIT: Next time please use SCAR tags and standards, so we can look at your code next time
    Sorry but its not missing an until lol.

    SCAR Code:
    procedure ChopTree;
    var
      x, y, MyMark: Integer;
    begin
      if not Loggedin then Exit;
      MarkTime(MyMark);
      repeat
        if FindObj(x, y, 'ree', TreeColor0, 30) then
        begin
          Mouse(x, y, 0, 0, false);
          if ChooseOption('ree') then
          begin
            //increase 1 to the total tree chop - if we had one
            Wait(WaitPerTree);
            Exit; //We clicked chop, now we can exit this procedure.
          end;
        end;
        if TimeFromMark(MyMark) > (2 * 60 * 100) then
        begin
          Logout;
          Exit;
        end;
      until false
    end;

    The whole script is messed up, its using an old SRL which needs xAntiBan.scar

    Half of the functions/procedures it is using don't even exist. (PlayerStats; etc)

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  7. #7
    Join Date
    Oct 2007
    Location
    Michigan
    Posts
    557
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Damn...Well back to the drawing board. Maybe later today I can get at it again.

    Thanks for all the help though!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Identifier Help
    By Rora in forum OSR Help
    Replies: 2
    Last Post: 12-16-2007, 10:59 PM
  2. Identifier help
    By Rora in forum OSR Help
    Replies: 3
    Last Post: 11-14-2007, 07:26 PM
  3. help with 3.10 identifier
    By fastler in forum OSR Help
    Replies: 4
    Last Post: 07-17-2007, 12:43 PM
  4. identifier
    By macromacro123 in forum OSR Help
    Replies: 1
    Last Post: 03-06-2007, 04:10 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
  •