Results 1 to 17 of 17

Thread: comma expected in script

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default comma expected in script

    if(FindColorTolerance(i FlaxColor, 202, 113, 382, 202, 10,))then


    this was on my lletya lax picker, idk where to put the "," on this line

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    That line should be:
    SCAR Code:
    if FindColorTolerance(X, Y, FlaxColor, 202, 113, 382, 202, 10) then

    I think.

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    SCAR Code:
    if FindColorTolerance(X, Y, FlaxColor, 202, 113, 382, 202, 10) then

    nope its not that. i'm still getting

    Line 55: [Error] (12709:25): comma (',') expected in script C:\Users\akwardsaw\Documents\akwardsaws lletya flaxer v1.scar

    ( if you need to see the script, i have it posted in the first script section )

  4. #4
    Join Date
    Jul 2007
    Location
    Ohio
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by akwardsaw View Post
    if(FindColorTolerance(i FlaxColor, 202, 113, 382, 202, 10,))then


    this was on my lletya lax picker, idk where to put the "," on this line
    SCAR Code:
    if(FindColorTolerance(i FlaxColor, 202, 113, 382, 202, 10))then
    That should work... You had a comma after the 10 in your first example...I took that out...

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    hmm, nope. ima still getting it.

  6. #6
    Join Date
    Mar 2006
    Location
    USA
    Posts
    948
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Edit: I just saw that you said you posted the whole script somewhere, I'll go try and find it.

    Edit:
    BTW you really should be using the MSX1, MSY1 and like constants for your search boundaries.

    One More Edit:
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    const
      Col = 0;  //Color for script to search for\
      Tol = 10; //Tolerance to use while searching

    var
      X, Y: integer; //Integers x and y as mouse coordinates

    begin
      SetupSRL;
      if FindColorTolerance(X, Y, Col, MSX1, MSY1, MSX2, MSY2, Tol) then //Searches for Col declared above with Tol above in the mainscreen
        Mouse(X, Y, 3, 3, True); //Move mouse to color with up to 3 pixels random Y And/Or X movement
    end.
    I made you an example of how to use FindColorTolerance.

    You should probably read some tutorials on SCAR scripting. I've been scripting for a while and I still find tutorials useful.

    - Bam Bam

    Edit: I hate edits... And it wouldn't hurt for you to read the tutorial in my siggy, but overall your standards were fairly good.

  7. #7
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    thanks =] that should help out. actually i just read your tut, making it up to standards, i made some other small improvements, and i'll try fixing that bug when i get home from school

    edit: i added MSX1 ect into it, and its still saying it needs a comma

  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Here you go:
    SCAR Code:
    ///////////////////////////////INSTRUCTIONS!\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    /////////////////////////////FILL OUT SETTINGS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    //////////////PUT THE CROSS HAIRS OVER THE RUNESCAPE WINDOW\\\\\\\\\\\\\\\\
    //////////////////////////HIT PLAY AND HAVE FUN\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ////////////////////////START IN LLETYA FLAX FEILD\\\\\\\\\\\\\\\\\\\\\\\\\
    //////////MAKE SURE YOU ARE LOGGED ON FIRST, AND AN EMPTY INVENTORY\\\\\\\\
    ////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    /////////////thanks to Nova2 for the great constructive feedback\\\\\\\\\\\
    //////////// Bigger Thanks to NaumanAkhlaQ for making the script better//////
    program LletyaFlaxPickerBanker;
    {.include SRL\SRL.scar}

    var
      i,x,y,clicks: integer;

    const//  VVVV  VVVV  VVVV SETTINGS VVVV  VVVV  VVVV  VVVV
    Loads = 10; //How many loads per player before switching

    YourSRLId = '';      { if you want it to be}
    YourSRLPassword = ''; {added to your srl stats}

    FlaxColor=  463567;// the blue part of the flax
    TimeToWait= 5000;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'Username';
      Players[0].Pass := 'Password';
      Players[0].Nick := 'ser';
     // Players[0].Pin := '  '; // leave blank if you dont have a pin
      Players[0].Active := True;
    end;
    /////////////////////DO NOT EDIT BEYOND THIS POINT\\\\\\\\\\\\\\\\\\\\\\\
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Crafting', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end;



    //picks flax till inventory is full
    procedure PickFlax;
    var
    TOL,clicks : iNTEGER;
    begin
     Tol := 10;
      repeat
        if FindColorTolerance(x, y, FlaxColor, MIX1, MIY1, MIX2, MIY2, TOL)then
        begin
          Mouse(x,y, 2, 3, true);
          Clicks:= Clicks+ 1;
          Wait(TimetoWait- 200);
        end;
        Wait(200);
      until(InvFull);
    end;

    procedure WalkToBank;
    begin
      if(FindColorTolerance(x,y, 4879491, 601, 34, 615, 44, 10))then
         begin
           Mouse(x,y, 4, 2, true);
         end;
    end;

    Function Banking : Boolean;
    var
    Loads1,FlaxNum,LoadsNum:Integer;
    begin
      if (InvFull) then
      begin
        MakeCompass('N');
        Wait (300 + random(160));
        OpenBankQuiet('lb');
        if (PinScreen) then
        //InPin(Players[0].Pin);
        if(FindColorSpiral(x,y, 65536, 589, 219, 589, 219))then
        begin
         Mouse(x,y, 4, 3, false);
         ChooseOption('All');
         Loads1 := Loads1+ 1;
         Result := True;
         if Result = True then
         begin
           FlaxNum := FlaxNum + 1;
           LoadsNum := LoadsNum + 1;
           ReportVars[1] := ReportVars[1] + 1;
           SendSRLReport;
         end;
       end;
       CloseBank;
       Wait(150 + random (278));
       MakeCompass('S');
      end;
    end;

     
    procedure WalkFromBank;
    Begin
    MakeCompass('N');
    begin
      if(FindColorTolerance(x,y, 12414830, 620, 118, 646, 150, 10))then
      begin
           Mouse(x,y, 5, 1, true);
         end;
      end;
    end;

    procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True, 1, 15000);
      FindNormalRandoms;
      FindLamp('Crafting');
    end;

     procedure ProgressReport;
    begin
      ClearDebug;
      Writeln('[]========================================[]');
      Writeln('---------------->Your Proggy<----------------');
      Writeln('  did ' + IntToStr(Loads) + ' Loads' + '    ');
      Writeln('---------------------------------------------');
      Writeln('picked ' + IntToStr(Clicks) + ' flax' + '        ');
      Writeln('[]========================================[]');
    end;

    procedure Signature;
    begin
      writeln('-------------------akwardsaw`s lletya flaxzorz-----------------');
      writeln('       / /\ \        |  |   /  / \ \                            / /');
      writeln('      / /  \ \       |  |  /  /   \ \            /\            / /');
      writeln('     / /    \ \      |  | /  /     \ \          /  \          / /');
      writeln('    / /      \ \     |  |/  /       \ \        / /\ \        / /');
      writeln('   / /--------\ \    |  |\  \        \ \      / /  \ \      / /');
      writeln('  / /----------\ \   |  | \  \        \ \    / /    \ \    / /');
      writeln(' / /            \ \  |  |  \  \        \ \  / /      \ \  / /');
      writeln('/ /              \ \ |  |   \  \        \ \/ /        \ \/ /');
      wait(3000 + random(750));
    end;



    //Main Loop//
    begin
      ActivateClient;
      DeclarePlayers;
      repeat
        if(not(LoggedIn))then
        Exit;
          AntiBan;    //done
          AntiRandoms;//done
          PickFlax;   //done
          WalkToBank; //done
          Banking;    //done
          ProgressReport; //done
          WalkFromBank; //done
          until(true);
          signature; //done
        end.
       
        { things that need to be worked on:
         Make more failsafes, having one is not enough.
         You are missing a LOT of identifiers (begins and ends).
         that line 55 error}

    You need to use x,y i on its own willn't do.

    Hope I Helped

  9. #9
    Join Date
    Mar 2006
    Location
    USA
    Posts
    948
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Here you go:
    You need to use x,y i on its own willn't do.

    Hope I Helped
    I started fixing the script for you but I had decided it would probably be more beneficial to you if I just made you a little tutorial.

    You are getting the comma expected errors because you don't have the x and y mouse coordinates properly setup in your script. If you look at the way I used FindColorTol and Mouse you should notice major differences. You also need to declare X and Y as global variables which I did in my little example script. Which NaumanAkhlaQ also did when he posted the fixed script.

  10. #10
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    wewt, thanks a bunch NaumanAkhlaQ, it starts and stuff, but i need to fix something in the main loop, its not picking the flax. all it does is go up, hit the inventory spot and sit there, i'v looked through the script but i cant see any thing to fix it =p

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Ok no Problem. My Sig.

  12. #12
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Ok no Problem. My Sig.
    Stop begging for rep pl0x, mmkay? It doesn't make any difference... so what if you get 140+ rep points? It doesn't affect a thing.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  13. #13
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Lol Hy you have 2 boxs aswell, btw you have 144 something rep?

  14. #14
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Well, I don't post in threads "Rep me pl0x!1!1!" or put "REP ME!!!" in my siggy. Only place I mention to rep me is on my Caver page 1.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  15. #15
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Nice Nice

  16. #16
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    haha hey guys, dont use my thread to flame each other =]

  17. #17
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Like akwardsaw just said, Go fight about this somewhere else. And Naum you can't ask people to rep you.

    Closed.
    STOP PM'ING ME

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Error]: comma (',') expected in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 20
    Last Post: 05-22-2008, 12:27 AM
  2. comma ',' expected? :S
    By svarrio in forum OSR Help
    Replies: 4
    Last Post: 10-24-2007, 05:59 AM
  3. Replies: 4
    Last Post: 05-30-2007, 04:01 PM
  4. Replies: 9
    Last Post: 04-16-2007, 08:46 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
  •