Results 1 to 22 of 22

Thread: Help please

  1. #1
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default Help please

    SCAR Code:
    procedure FletchMania;
    var
     Logz, FletchNumbers: integer;
    begin
      gametab(4);
      repeat
        if finddtm(LogsFletch, x, y, 550, 203, 731, 464) then
        begin
          Mouse(x, y, 3, 3, True);
         end;
          begin
            wait(random(400) + 100);
           if finddtm(Knife, x, y, 550, 203, 731, 464) then
          Result := True;
          end else
          Result := false;
           Mouse(x, y, 3, 3, True);
    end;
       begin
        wait(500+random(200));
        case LowerCase(Players[CurrentPlayer].Strings[1]) of
        'short' : FletchS;
        'long'  : FletchL;
       end;
      end;
       until (Result = True);
     end;

    Line 1114: [Error] (13937:1): Unknown identifier 'Result' in script C:\Program Files\SCAR 3.12\workdray3.scar
    Failed when compiling

    line 1114 is
    SCAR Code:
    Result := True;

    been stuck on this for a while, im pretty sure its because the Repeat.
    oh yeah ive already tried adding result to the Var ends up to say
    Line 1103: [Error] (13926:1): Duplicate identifier 'result' in script C:\Program Files\SCAR 3.12\workdray3.scar
    THANKS! hoping this is not consider as a spam

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Lol simple mistake

    Just think Procedure -> Function.... Result

  3. #3
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Thanks Derek

    so gonna be

    SCAR Code:
    Function FletchMania:Boolean;
    var
     Logz, FletchNumbers: integer;
    begin
      gametab(4);
      repeat
        if finddtm(LogsFletch, x, y, 550, 203, 731, 464) then
        begin
          Mouse(x, y, 3, 3, True);
         end;
          begin
            wait(random(400) + 100);
           if finddtm(Knife, x, y, 550, 203, 731, 464) then
          Result := True;
           else
          Result := false;
           Mouse(x, y, 3, 3, True);
    end;
       begin
        wait(500+random(200));
        case LowerCase(Players[CurrentPlayer].Strings[1]) of
        'short' : FletchS;
        'long'  : FletchL;
       end;
      end;
       until (Result = True);
     end;

    btw
    the
    SCAR Code:
    else
    Line 1115: [Error] (13938:1): Identifier expected in script C:\Program Files\SCAR 3.12\workdray3.scar

    since i did
    SCAR Code:
    function fletchmania:boolean;

  4. #4
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Take out the semicolon in:
    SCAR Code:
    if finddtm(Knife, x, y, 550, 203, 731, 464) then
    Result := True; //<- right here
    else

  5. #5
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    than i get this error

    Line 1115: [Error] (13938:1): Identifier expected in script C:\Program Files\SCAR 3.12\workdray3.scar

    ^^ ive never heard of that error l0l

    for
    Result = True;

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You can't have a semicolon before an 'else' statement.

  7. #7
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    so any ideas what i should do?

    :S

  8. #8
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Fixed it, standards and everything

    SCAR Code:
    Function FletchMania:Boolean;
    var
     Logz, FletchNumbers: integer;
    begin
      gametab(4);
      repeat
        if finddtm(LogsFletch, x, y, 550, 203, 731, 464) then
        begin
          Mouse(x, y, 3, 3, True);
          wait(random(400) + 100);
          if finddtm(Knife, x, y, 550, 203, 731, 464) then
          begin
            Result := True;
          end else
          Result := false;
          Mouse(x, y, 3, 3, True);
         end;
         begin
           wait(500+random(200));
           case LowerCase(Players[CurrentPlayer].Strings[1]) of
             'short':  FletchS;
             'long' :  FletchL;
           end;
         end;
      until (Result = True);
    end;
    METAL HEAD FOR LIFE!!!

  9. #9
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function FletchMania: Boolean;
    var
     Logz, FletchNumbers: Integer;
    begin
      gametab(4);
      repeat
        if finddtm(LogsFletch, x, y, 550, 203, 731, 464) then
          Mouse(x, y, 3, 3, True);
        wait(random(400) + 100);
        if finddtm(Knife, x, y, 550, 203, 731, 464) then
        begin
          Result := True;
        end else
          Result := false;
        Mouse(x, y, 3, 3, True);
        wait(500+random(200));
        case LowerCase(Players[CurrentPlayer].Strings[1]) of
          'short' : FletchS;
          'long'  : FletchL;
        end;
      until(Result);
    end;
    ...

    EDIT: beat me!
    mines better

  10. #10
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    haha i pwn by beating a timer... (pun intended) [/end lame joke]
    METAL HEAD FOR LIFE!!!

  11. #11
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    LOL thanks alot guys! i appreciate and wow 7 members looking at this thread hehe that shows how much srl helps :P i should post my problems here more often hehe

    ^^LAMER JOKE THAN GERA lol beat that

  12. #12
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    yikes another problem

    until(TimeFromMark(ScriptTime) >= Time);

    Line 1270: [Error] (14093:1): Identifier expected in script C:\Program Files\SCAR 3.12\workdray3.scar

  13. #13
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    lol did you declare scripttime as a variable?
    METAL HEAD FOR LIFE!!!

  14. #14
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    procedure FletchMania;
    var
     Logz, FletchNumbers: integer;
    begin
      GameTab(4);
      repeat
        if (FindDtm(LogsFletch, x, y, 550, 203, 731, 464)) then
        begin
          Mouse(x, y, 3, 3, True);
          Wait(Random(400) + 100);
          Result := (FindDtm(Knife, x, y, 550, 203, 731, 464));
          Mouse(x, y, 3, 3, True);
        end;
        Wait(500 + Random(200));
        case LowerCase(Players[CurrentPlayer].Strings[1]) of
          'short' : FletchS;
          'long'  : FletchL;
        end;
      until (Result);
    end;

    Shorter... but you still need failsafes.

    EDIT:
    Quote Originally Posted by p1nky View Post
    yikes another problem

    until(TimeFromMark(ScriptTime) >= Time);

    Line 1270: [Error] (14093:1): Identifier expected in script C:\Program Files\SCAR 3.12\workdray3.scar
    Post the procedure before that.

  15. #15
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    yes i did declare to the var

  16. #16
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    then post your shit...i mean script
    METAL HEAD FOR LIFE!!!

  17. #17
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    SCAR Code:
    begin
      MarkTime(SRLRRLT);
      ScriptID := '510';
      SRLID := YourSRLId;
      SRLPassword := YourSRLPass;
      GetAllLevels;
      ReportVars[5] := 1;
      rock:= setrockddtm;
      Disguise('Windows Messenger');//start script and you'll see on the bottom of your screen
      SetupSRL;  //sets all srl vars
      DeclarePlayers;  //player log in
      ActivateClient;
      MarkTime(ScriptTime);
      wait(1000);
      report;
      if not(loggedin)then
      loginplayer;
      GetAllLevels;
      SetPlayer;
      Dropper := 0;
      TreesChopped := 0;
      if players[currentplayer].booleans[0] = false then
      WalkingToWillows;
      TreesChopped := TreesChopped + 27;  //if all slots (28) filled
      report;
      repeat
      repeat
        case LowerCase(Players[CurrentPlayer].Strings[1]) of //declare players string
          'tree': RegularTreeChopper;
          'oak': OakChopper;
          'willow': WillowChopper;
          'all': RsDestroyer;
        end;
        if (InvFull) then
        begin
          if players[currentplayer].booleans[0] = true then
          begin
           case LowerCase(Players[CurrentPlayer].Strings[3]) of
          'smart': SmartDrop;
          'fast': FastDrop;
           end;
            begin
            WaitWhileFletching;
            Wait(20000);
             if DropFletchbows then FastDrop;
         begin
           case LowerCase(Players[CurrentPlayer].Strings[1]) of //declare players string
          '1': RandomType;
          '2': PinkyBank;
          '3': FletchMania;
         end;
          if TimeFromMark(Start) > (TimeToStop * 3600000) then
        begin
          WriteLn('Times Up Script TERMINATED!');
          Break;
        end;
          if not LoggedIn then
          begin
            NextPlayer(false);
            SetPlayer;
          end;
        end;
      end;
      until(false);
        logout;
        nextplayer(false);
    end.

    the until(false) is the problem...

    im using this now

    if TimeFromMark(Start) > (TimeToStop * 3600000) then
    begin
    WriteLn('Times Up Script TERMINATED!');
    Break;

    to stop the script its in the const (1<1 hour)
    so the until(false) is causing probs

    Line 1275: [Error] (14098:1): Identifier expected in script C:\Program Files\SCAR 3.12\workdray3.scar

    oh yea is there anyway i can use a other program to do my standards i SUCK AT THEM LOL

  18. #18
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    hah it looks like you have two repeats and only one until...

    take out one of those repeats and that should do it
    METAL HEAD FOR LIFE!!!

  19. #19
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    no sur

    still same error lol i knew that aint the problem i like to leave stuff in there even though its working hehe makes it look more complex l0l

    ;D

  20. #20
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Missing 2 ends.


  21. #21
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    There's 1 extra repeat and you are short an end (though you have thrown in a few extra begins especially after the cases)

  22. #22
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by p1nky View Post
    oh yea is there anyway i can use a other program to do my standards i SUCK AT THEM LOL
    Theres a program called DelFor (I think).

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •