Results 1 to 16 of 16

Thread: [error] (17795:1) : Identifier expected in script

  1. #1
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [error] (17795:1) : Identifier expected in script

    What does this mean please and why does it occur in a line only containing a procedure name??
    lol i know i'm a noob :P
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  2. #2
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Well Identifier expected could mean quite a few different things. In your case, it means something / some word is missing from the script.

    It will help if you post the script you are using here, so we can help you debug your problem.

    If the error is occuring on a line where there is only a procedure name it could mean (and these are the most common)
    • In the procedure above it, you are missing an 'end';
    • You missed out a semicolor ';' on the procedure name line.


    If not, post the script here and we can try to help you out.
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  3. #3
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i think its because i had named the procedure LoadInv which was probably confusing SCAR into thinking it was supposed to be loading something...will try a different name and if this doesn't work will post the script for general perusal/criticism
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  4. #4
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nope that wasn't it...k here is the script... bear in mind it is my very first attempt so please feel free to point out any improvements although i'll probably not know how to do anything you would suggest lol.
    Thanks in advance for any help...

    this is the procedure before the fault and the one with the fault.. it is the line with procedure Inventory; that has the issue.

    procedure Banking;

    begin
    Status('Banking');
    if(Findcolorspiraltolerance(xb,yb,BankColour,266,1 29,343,433,20)) then
    begin
    MoveMouseSmoothEx(xb,yb,1,3,45,20,10);
    FTwait(2);
    ClickMouse(xb,yb,False);
    FTwait(3);
    ClickText('uickly',157,146,365,267);
    FTwait(4);
    end;


    procedure Inventory;
    var
    x1,y1,x2,y2: Integer

    begin
    If (FindBitmapIn(longbowu,x1,y1,556,206,735,255)) then
    begin
    MoveMouseSmoothEx(x1,y1,1,3,45,20,10);
    FTWait(2);
    ClickMouse(x1,y1,False);
    FTWait(2);
    ClickText('tore All',565,217,741,436);
    end
    If (FitBitmapIn(willowlogs,x2,y2,72,57,257,97)) then
    begin
    MoveMouseSmoothEx(x2,y2,1,3,45,20,10);
    FTWait(2);
    ClickMouse(x2,y2,False);
    FTWait(2);
    ClickText('ithdraw All',67,59,457,280);
    FTWait(2);
    CloseBank;
    end
    end;
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  5. #5
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have you declared your longbow and willowlogs bmps?

  6. #6
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yep, sorry i should have mentioned that... this is only the section prior to the problem and the problem its self... it has the error in the thread title on line 134 which is the line reading 'procedure Inventory'

    [edit] also could someone tell me how to slow the mouse down on MoveMouseSmoothEx.... do i just have to alter one of the variables as the set i am using at the moment seems quite fast and non-human... i do have MouseSpeed:=10-random(5) later in the script, will that do it?
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  7. #7
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    x1,y1,x2,y2: Integer
    TO:
    SCAR Code:
    x1,y1,x2,y2: Integer;

  8. #8
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    no, thats not it,

    You'll notice in the procedure Banking;, you have 2 begins, but only one end;
    You must add another end; onto the procedure to close all tags

    Code:
    procedure Banking;
    
    begin                        //BEGIN HERE
    Status('Banking');
    if(Findcolorspiraltolerance(xb,yb,BankColour,266,1 29,343,433,20)) then
    begin                        //BEGIN HERE
    MoveMouseSmoothEx(xb,yb,1,3,45,20,10);
    FTwait(2);
    ClickMouse(xb,yb,False);
    FTwait(3);
    ClickText('uickly',157,146,365,267);
    FTwait(4);
    end;                        //END HERE
    end;                        //END HERE
    I would also suggest using MMouse, instead of MoveMouseSmoothEx and Mouse instead of ClickMouse. They are a lot less detectable.
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  9. #9
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oops hadn't noticed that thanks Pentti... sadly i'm still getting the same error message although you have just probably saved me from another frustration when this is solved.
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  10. #10
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that sounds like it... thanks... will try MMouse and Mouse... looked at them before but it was before i got the hang of this... Starblaster the hero
    Thanks everyone, keep your eye out for the best willow fletcher ever soon... ok ok not that impressive but its a start lol.
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  11. #11
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok whole new problem... in my progress report i am getting the error message 'type mismatch' for 'Loads Done '+Loads+'.';

    procedure Progess;
    begin
    ClearDebug;
    Writeln('/=========================================\');
    Writeln('¦====YORKSHIREKNIGHTS WILLOW FLETCHER=====¦');
    Writeln('\======================================== =/');
    Writeln(' Worked for '+TimeRunning+'.');
    Writeln(' Loads Done '+Loads+'.');
    Writeln('\======================================== =/');
    SRLRandomsReport;
    PlayerStats;
    end;

    p.s thanks for patience and help
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  12. #12
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Well it is most likely your variable Loads is an Integer, meaning it is a number, not a string.

    The command for turning Integers into Strings is - IntToStr (Integer to String)
    The command for turning Strings into Integers is - StrToInt (String to Integer)

    Your final code will be:

    Code:
    procedure Progess;
    begin
    ClearDebug;
    Writeln('/=========================================\');
    Writeln('¦====YORKSHIREKNIGHTS WILLOW FLETCHER=====¦');
    Writeln('\======================================== =/');
    Writeln(' Worked for '+TimeRunning+'.');
    Writeln(' Loads Done '+IntToStr(Loads)+'.');
    Writeln('\======================================== =/');
    SRLRandomsReport;
    PlayerStats;
    end;
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  13. #13
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ofcourse, ofcourse... well they do say learn by doing... i go by learn by making mistakes lol
    Thanks again
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  14. #14
    Join Date
    Jan 2007
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok ok, one last question... i hope... although it is a nooby one.
    What parameters do MMouse and Mouse use.
    Thanks yet again in advance
    http://www.fenjer.com/adnan/SRL/10/1...cher%20v.1.png
    http://www.fenjer.com/adnan/SRL/12/2...nker%20v.1.png
    If I see you autoing with level 3/default clothes/crap name I WILL report you.
    Auto Correctly. - put this in your sig

  15. #15
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oops. Yea, Starblaster caught the problem

    I thought I had checked for begins and ends, but I only did it for the inventory procedure. Forgot that the errors are sometimes the line before where SCAR says they are.

  16. #16
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by yorkshireknight View Post
    ok ok, one last question... i hope... although it is a nooby one.
    What parameters do MMouse and Mouse use.
    Thanks yet again in advance
    If you open MouseFlag.scar, you can see what parameters they use. Ill do it for you this time however:

    PHP Code:
    function MMouse(dxdyRandXRandYInteger): Boolean;
    procedure Mouse(mousexmouseyranxranyIntegerleftBoolean); 
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 11-02-2008, 12:39 PM
  2. Replies: 2
    Last Post: 08-25-2008, 01:32 AM
  3. Replies: 10
    Last Post: 06-01-2008, 02:15 PM
  4. Replies: 8
    Last Post: 02-03-2008, 01:58 AM
  5. Replies: 4
    Last Post: 02-05-2007, 02:13 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
  •