Results 1 to 7 of 7

Thread: SRL Indenting

  1. #1
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default SRL Indenting

    All credits go to RSN

    Quote Originally Posted by RsN

    • We use a ; after every statement and also every end that is not followed by an else has it.
    • We use two spaced tabs to set this configuration go in scar to Tools > Options... > General Settings - Used fixed size tabs - 2
    • We always use a spaces after ,'s
    • We dont capitalize words Scar makes bold
    • We Capitalize firts letter of all types (e.g: Integer, String, Boolean, etc);
    • For parenthesis surrounded by letters, we use a space separator (e.g: if ((this) or (that)) then)
    • for cases use this example


    Code:
    function ClickOption(s : String; i : Integer) : Boolean;   //by RSN
    var
      x, y, tmpMask : Integer;
    begin
      tmpMask := CreateBitmapMaskFromText(s, UpChars);
      case i of
        1 :
        begin
          if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50)) then
          begin
            Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
            Result := True;
            Wait(250);
          end;
        end;
        2 :
        begin
          if (FindBitmapMaskTolerance(tmpMask, x, y, 550, 200, 750, 470, 10, 50)) then
          begin
            Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
            Result := True;
            Wait(250);
          end;
        end;
        3 :
        begin
          if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 340, 500, 460, 10, 50)) then
          begin
            Mouse(x + (Length(s) * 6 div 2), y + 5, 3, 3, True);
            Result := True;
            Wait(250);
          end;
        end;
      end;
      FreeBitmap(tmpMask);
    end;
    RsN
    IF you are planning to make a script makess sure to follow those standars
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  2. #2
    Join Date
    Feb 2006
    Posts
    411
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    just make a code formatter.....................

  3. #3
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Many have been made, but theres always bugs that screw up your code.

  4. #4
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    A code formatter?
    Could a scar script be made which examined your script and formatted it? I would give it a shot if scar recognised the fonts used in scar scripts..

  5. #5
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is also known as the "Scar script standards." I posted a tutorial on this and it is also located somewhere.

  6. #6
    Join Date
    Feb 2006
    Location
    Franklin, Ohio, USA
    Posts
    991
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ruler
    just make a code formatter.....................
    I would if you could send me that obfuscator, Ill just change it around alot into a code formatter

  7. #7
    Join Date
    Feb 2006
    Location
    Berkeley, CA
    Posts
    1,837
    Mentioned
    52 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by Krazy_Meerkat
    A code formatter?
    Could a scar script be made which examined your script and formatted it? I would give it a shot if scar recognised the fonts used in scar scripts..
    Can't scar read data out of a file

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
  •