• Log in or sign up for an account here: https://www.sythe.org/login

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

p_w_m_p

Newcomer
Joined
Aug 16, 2009
Sythe Gold
0
Messages
11
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!
 
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.
 
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
 
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
 
Runescape Gamblingrunescape gambling
Back
Top