Problem with Scar Script

Discussion in 'Code Snippets and Tutorials' started by FastBullet, Jul 28, 2008.

  1. FastBullet

    FastBullet Level IV

    Joined:
    Feb 7, 2007
    Messages:
    2,137
    Likes Received:
    45
    program Fastys;

    procedure Start
    begin
    ClickMouse(464,465, True);
    MoveMouse(492,408);
    HoldMouseMid(492,408);
    MoveMouse(488,487);
    ReleaseMouseMid(498,442);
    ClickMouse(503,194, True);
    HoldMouseMid(491,346);
    MoveMouse(491,370);
    ClickMouse(462,288, True);
    ClickMouse(504,379, True);
    HoldMouseMid(493,291);
    MoveMouse(493,350);
    ReleaseMouseMid(493,350);
    ClickMouse(493,349, True);
    end.

    begin
    Start;
    end.

    This is the scar Script...it gives this error at bottom :

    Line 4: [Error] (4:1): Semicolon (';') expected in script C:\Documents and Settings\Ionut\Desktop\Fasty Shadowrpg scar.scar

    How do I fix it?
     
  2. gawjus1234

    gawjus1234 Level III

    Joined:
    May 22, 2007
    Messages:
    518
    Likes Received:
    3
    Location:
    Las Vegas
    put a semi-colon after the word "begin" on line 4 see if that works
     
  3. FastBullet

    FastBullet Level IV

    Joined:
    Feb 7, 2007
    Messages:
    2,137
    Likes Received:
    45
    actually it was before the word "begin" :)

    Read some tutorials --> --> -->
     
  4. Zer0

    Zer0 Level IV

    Joined:
    Mar 2, 2008
    Messages:
    3,037
    Likes Received:
    180
    Location:
    Home sweet home
    I'm not a SCAR expert, in fact I don't know any SCAR at all. However, you almost never put a semi-colon in the beginning of a line to terminate a statement. Putting a semi-colon at the beginning of a line would mean that you terminate the last statement on the previous line. In your case that would be "procedure Start".
     
  5. gawjus1234

    gawjus1234 Level III

    Joined:
    May 22, 2007
    Messages:
    518
    Likes Received:
    3
    Location:
    Las Vegas
    well did putting it before begin work?

    i had the same thought absolutezer0. cuz i have been learning java (which is the basis for SCAR) and you put semi-colons after statements. but if it worked. then do that because wasnt he just trying to get the script to work :)
     
  6. fail

    fail Level IV

    Joined:
    Aug 31, 2007
    Messages:
    1,676
    Likes Received:
    32
    Lol me and Fastbullet got most of this script working
     
  7. chelsea1

    chelsea1 Level IV

    Joined:
    Nov 26, 2006
    Messages:
    2,538
    Likes Received:
    31
    Location:
    London
    fixed ;)
    program Fastys;

    procedure Start;
    begin
    ClickMouse(464,465, True);
    MoveMouse(492,408);
    HoldMouseMid(492,408);
    MoveMouse(488,487);
    ReleaseMouseMid(498,442);
    ClickMouse(503,194, True);
    HoldMouseMid(491,346);
    MoveMouse(491,370);
    ClickMouse(462,288, True);
    ClickMouse(504,379, True);
    HoldMouseMid(493,291);
    MoveMouse(493,350);
    ReleaseMouseMid(493,350);
    ClickMouse(493,349, True);
    end;

    begin
    Start;
    end.
     
    Phee likes this.
  8. Zer0

    Zer0 Level IV

    Joined:
    Mar 2, 2008
    Messages:
    3,037
    Likes Received:
    180
    Location:
    Home sweet home
    Ah, so I was right! This reminds me of a time where I put semi-colons at the beginning of every line in one of my programs. This worked, since each semi-colon terminated the statement on the previous line. And stand-alone semi-colons don't do anything. :D
     
  9. gawjus1234

    gawjus1234 Level III

    Joined:
    May 22, 2007
    Messages:
    518
    Likes Received:
    3
    Location:
    Las Vegas
    oh ya. that happens in java sometimes. it tells you the line that is below the one that needs a semi-colon. ok well i am glad you got it working.
     
  10. Dusk412

    Dusk412 Level I

    Joined:
    Aug 2, 2008
    Messages:
    88
    Likes Received:
    9
    They may have fixed your problem, but I will tell you why, so it does not happen again. In the original script, you have a period after the 'end' when you wanted to stop your procedure. The thing is, the only time you have an 'end' followed by a period is for the termination of the entire script. In procedures and functions, you use a semicolon after the end. Good luck.

    - Dusk412