Results 1 to 5 of 5

Thread: Please Help!

  1. #1
    Join Date
    Oct 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Please Help!

    Hi,

    Here is my script, there seems to be a problem:

    SCAR Code:
    ///////////////////////////////////////////////////////////////////////////////
    {   CamdoTYper By CamdoClark

    Have Fun! [url]www.srl-forums.com[/url]   Thanks to Santa_Clause and floor66 for helping me.}



    program CamdoTyper;
    {.include SRL/SRL.scar}
    var
    HowManyTypes,Time: integer;
    const
    HowManyMessages=1; //Would you like there to be two messages in a row?
    Message1='Hi!'; //Type the message that will be put in.
    Message2=''; //Type the next message that will appear. If there is only one, leave blank.
    Cyan=True;  //True for Cyan
    Red=False;   //True for red
    Scroll=False; //True for scroll
    Purple=False;   //True for purple
    Green=False; //True for green
    {Don't mess with anything down here.}
    procedure TypeIt;
    begin
    HowManyTypes:=0;
    Time:=7000;
    SetupSRL;
    repeat
    if (Cyan=True) and (HowManyMessages=1) then
    begin
    TypeSend('cyan:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Red=True) and (HowManyMessages=1) then
    begin
    TypeSend('red:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Scroll=True) and (HowManyMessages=1) then
    begin
    TypeSend('scroll:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Purple=True) and (HowManyMessages=1) then
    begin
    TypeSend('purple:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Green=True) and (HowManyMessages=1) then
    begin
    TypeSend('green:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Cyan=True) and (HowManyMessages=2) then
    begin
    TypeSend('cyan:' + Message1);
    Wait(Time);
    TypeSend('cyan:' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Red=True) and (HowManyMessages=2) then
    begin
    TypeSend('red:' + Message1);
    Wait(Time);
    TypeSend('red:' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Scroll=True) and (HowManyMessages=2) then
    begin
    TypeSend('scroll:' + Message1);
    Wait(Time);
    TypeSend('scroll' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Purple=True) and (HowManyMessages=2) then
    begin
    TypeSend('purple:' + Message1);
    Wait(Time);
    TypeSend('purple:' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Green=True) and (HowManyMessages=2) then
    begin
    TypeSend('green:'+ Message1);
    Wait(Time);
    TypeSend('green:'+ Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    until(false);
    end;
    procedure Display;
    begin
    Writeln('Typed '+IntToStr(HowManyTypes)+' phrases');
    end;
    begin
    SetupSRL;
    TypeIt;
    Display;
    end.

    Here's what keeps showing up:

    Line 97: [Error] (14778:1): Identifier expected in script C:\Program Files\SCAR 3.12\Scripts\CamdoTyper.scar

    Thanks,
    Camdo Clark

  2. #2
    Join Date
    Oct 2007
    Location
    medway.england
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    ///////////////////////////////////////////////////////////////////////////////
    {   CamdoTYper By CamdoClark
    
    Have Fun! <a href="http://www.srl-forums.com" target="_blank">www.srl-forums.com</a>   Thanks to Santa_Clause and floor66 for helping me.}
    
    
    program CamdoTyper;
    {.include SRL/SRL.scar}
    var
    HowManyTypes,Time: integer;
    const
    HowManyMessages=1; //Would you like there to be two messages in a row?
    Message1='Hi!'; //Type the message that will be put in.
    Message2=''; //Type the next message that will appear. If there is only one, leave blank.
    Cyan=True;  //True for Cyan
    Red=False;   //True for red
    Scroll=False; //True for scroll
    Purple=False;   //True for purple
    Green=False; //True for green
    {Don't mess with anything down here.}
    procedure TypeIt;
    begin
    HowManyTypes:=0;
    Time:=7000;
    SetupSRL;
    repeat
    if (Cyan=True) and (HowManyMessages=1) then
    begin
    TypeSend('cyan:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Red=True) and (HowManyMessages=1) then
    begin
    TypeSend('red:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Scroll=True) and (HowManyMessages=1) then
    begin
    TypeSend('scroll:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Purple=True) and (HowManyMessages=1) then
    begin
    TypeSend('purple:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Green=True) and (HowManyMessages=1) then
    begin
    TypeSend('green:' + Message1);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Cyan=True) and (HowManyMessages=2) then
    begin
    TypeSend('cyan:' + Message1);
    Wait(Time);
    TypeSend('cyan:' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Red=True) and (HowManyMessages=2) then
    begin
    TypeSend('red:' + Message1);
    Wait(Time);
    TypeSend('red:' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Scroll=True) and (HowManyMessages=2) then
    begin
    TypeSend('scroll:' + Message1);
    Wait(Time);
    TypeSend('scroll' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Purple=True) and (HowManyMessages=2) then
    begin
    TypeSend('purple:' + Message1);
    Wait(Time);
    TypeSend('purple:' + Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    if (Green=True) and (HowManyMessages=2) then
    begin
    TypeSend('green:'+ Message1);
    Wait(Time);
    TypeSend('green:'+ Message2);
    Wait(Time);
    HowManyTypes:=HowManyTypes+1;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    
    until(false);
    end;
    procedure Display;
    begin
    Writeln('Typed '+IntToStr(HowManyTypes)+' phrases');
    end;
    
    begin
    SetupSRL;
    TypeIt;
    Display;
    end.
    it compiles now, you just had to many end; 's

  3. #3
    Join Date
    Oct 2007
    Location
    Atlantis with u'r girlfriend
    Posts
    251
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i didn't know there was a limit to how many ends you could have. how many ends can you have?

  4. #4
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    One for each begin, one for each case and probably some other places. the number of ends always match with how many "case"'s and "begin"'s you have.

    -Knives

  5. #5
    Join Date
    Oct 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It works.

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
  •