'.' expected at end of script... wut??

Discussion in 'Scar/Simba Help' started by p_w_m_p, Aug 16, 2009.

'.' expected at end of script... wut??
  1. Unread #1 - Aug 16, 2009 at 12:54 AM
  2. p_w_m_p
    Joined:
    Aug 16, 2009
    Posts:
    11
    Referrals:
    0
    Sythe Gold:
    0

    p_w_m_p Newcomer

    '.' expected at end of script... wut??

    Edit: after another 3 cups of coffee and 20 looks I noticed the syntactical error on my part. Anyway, this is my dropper. Efficient looking, still have to give it a test. It runs through 26 slots of inventory and drops all but the first two slots.

    Edit2: Still won't compile as it is now. Updated the code to reflect what I have and the error is the same... '.' expected at line 48:4.

    Code:
    program dropper;
    var r,c,
    originx,originy,
    nextR,nextC,
    x,y : Integer;
    
    begin
      originx := 563;
      originy := 213;
      nextC := 41;
      nextR := 35;
      r := 0;
      c := 0;
      while(r<8) do
      begin
    
           if(c < 2) and (r = 0) then
           begin
                c := c + 1;
           end else
               if(c = 5) then
               begin
                    c := 0;
                    r := r + 1;
               end;
           end;
    
           while(c < 4) do
           begin
              x := (originx + (c * nextC)) + RandomRange(0,31);
              y := (originy + (r * nextR)) + RandomRange(0,31);
              movemousesmooth(x,y);
              wait(100+random(50));
              clickmouse(x,y,false);
              wait(50+random(50));
              x := x + (RandomRange(-30,30));
              if(r = 7) then
              begin
                   y := y + (458 + random(15));
              end else
                  y := y + (random(15));
              end;
              movemousesmooth(x,y);
              wait(25+random(25));
              clickmouse(x,y,true);
              wait(150+random(200));
              c := c + 1;
           end;
      end;
    end.
    Code:
    Failed when compiling
    Line 47: [Error] (48:4): period ('.') expected in script D:\Program Files\SCAR 3.12\Scripts\dropper.scar
    but but but everything lines up!
     
  3. Unread #2 - Sep 2, 2009 at 7:50 AM
  4. radiclerobby
    Joined:
    Mar 9, 2008
    Posts:
    720
    Referrals:
    0
    Sythe Gold:
    0

    radiclerobby Apprentice
    Banned

    '.' expected at end of script... wut??

    program dropper;
    var
    r,c,originx,originy,nextR,nextC,x,y : Integer;

    begin
    originx := 563;
    originy := 213;
    nextC := 41;
    nextR := 35;
    r := 0;
    c := 0;
    while(r<8) do
    begin

    if(c < 2) and (r = 0) then
    begin
    c := c + 1;
    end else
    if(c = 5) then
    begin
    c := 0;
    r := r + 1;
    end;
    end;

    while(c < 4) do
    begin
    x := (originx + (c * nextC)) + RandomRange(0,31);
    y := (originy + (r * nextR)) + RandomRange(0,31);
    movemousesmooth(x,y);
    wait(100+random(50));
    clickmouse(x,y,false);
    wait(50+random(50));
    x := x + (RandomRange(-30,30));
    if(r = 7) then
    begin
    y := y + (458 + random(15));
    end else
    y := y + (random(15));
    movemousesmooth(x,y);
    wait(25+random(25));
    clickmouse(x,y,true);
    wait(150+random(200));
    c := c + 1;
    end;
    end.
     
  5. Unread #3 - Sep 3, 2009 at 1:53 PM
  6. EduardSale
    Joined:
    Sep 3, 2009
    Posts:
    15
    Referrals:
    0
    Sythe Gold:
    0

    EduardSale Newcomer

    '.' expected at end of script... wut??

    Code:
    program dropper;
    var
    r,c,originx,originy,nextR,nextC,x,y : Integer;    // try to don't use enters on the var line.
    
    begin      // main begin
      originx := 563;
      originy := 213;
      nextC := 41;
      nextR := 35;
      r := 0;
      c := 0;
      while(r<8) do
      begin      // first begin
    
           if(c < 2) and (r = 0) then
           begin           //second begin
                c := c + 1;
           end else                  // first end
               if(c = 5) then
               begin                        // thirth begin
                    c := 0;
                    r := r + 1;
               end;        //second end
           end;     // last begin
    
           while(c < 4) do
           begin    // first begin           // < ------    A                    //
              x := (originx + (c * nextC)) + RandomRange(0,31);                  //
              y := (originy + (r * nextR)) + RandomRange(0,31);                  //
              movemousesmooth(x,y);                                              //
              wait(100+random(50));                                              //
              clickmouse(x,y,false);                                             //   See the A+B's
              wait(50+random(50));                                               //   All ends, and beginnings belong to eachother
              x := x + (RandomRange(-30,30));                                    //   And if while or procedure always uses:
              if(r = 7) then                                                     //     BEGIN and END; ( ';'  at the end)
              begin      // second begin      // <-----        B                 //   and the MAIN BEGIN uses a END.
                   y := y + (458 + random(15));                                  //   U used an extra END; so the program
              end else   // first end           // <----- A                      //    needs an MAIN end only. because there
                                                                                 // where only 2 while/if/procedure begins.
                  y := y + (random(15));
              end;     // second end            // <----- B
              movemousesmooth(x,y);
              wait(25+random(25));
              clickmouse(x,y,true);
              wait(150+random(200));
              c := c + 1;
      //   end;  // <---- delete this line         // third end is wrong.
    
    end.      //main end
    
    
    
    // What did u do wrong, you used to many 'ends'.
    
    



    You want to learn some more ? Check out my Thread at :http://www.sythe.org/showthread.php?t=683205

    Goodluck ! ~ Eduard
     
  7. Unread #4 - Sep 6, 2009 at 6:29 PM
  8. Hey321
    Joined:
    Jul 30, 2007
    Posts:
    503
    Referrals:
    0
    Sythe Gold:
    0

    Hey321 Forum Addict

    '.' expected at end of script... wut??

    Code:
    Program Drop;
    {.include srl/srl.scar}
    
    Procedure drop;
    Var
      I : Integer;
    Begin
      For I := 2 To 28 Do
        DropItem(I);
    End;
    
    begin
      SetupSRL;
      Drop;
    end.
    I like the way you made a work around for it though.

    ~Sandstorm
     
< SRL, SMART, and Reflection help | Click every pixel in the area? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site