Results 1 to 15 of 15

Thread: need help on first script

  1. #1
    Join Date
    May 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help on first script

    this, as the title says, is my first script. I dont really know that much about scripting...well anyway, here is my script.

    program script;

    const
    Message1='lending out godsword!'

    procedure lending;
    begin
    wait(4000)
    Writein(Message1);
    end;


    begin
    repeat
    lending;
    until(false)
    end.


    And here is my problem...

    Failed when compiling
    Line 6: [Error] (6:1): Semicolon (';') expected in script

    Help please?

  2. #2
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok welp if your trying to say that in rs is won't becasue you have writein and writein isn't even anything. Its WriteLn. And Message1='Lending out godsword!' should be Message1='Lending out godsword'; Tell me if you need any more help

    ~lVlaverick~

  3. #3
    Join Date
    May 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thnx appreciate the help.

    New client targeted
    Successfully compiled (45 ms)
    lending out godsword!
    lending out godsword!
    lending out godsword!
    lending out godsword!
    lending out godsword!
    lending out godsword!
    Successfully executed

    But, it doesnt appear on rs. Any idea why?

  4. #4
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yup i know excatly why :P ok writeln(Message1) will go into your debug box like you just posted. Ok make your script look like this:
    SCAR Code:
    Program Script;
    {.Include srl/srl.Scar}//This will make typesend an actuall function
    const
    Message1='lending out godsword!'

    procedure lending;
    begin
    wait(4000+random(1000)); ALAWAYS use random
    TypeSend(Message1);//This types the message into runescape like a human
    end;


    begin
    ActivateClient;//This activates the client that you have selected
    repeat
    lending;
    until(false)
    end.
    And then it should type it into runescape
    Hope this helped any more questions just post :0

    ~lVlaverick~

  5. #5
    Join Date
    May 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for the help! =)

    uhg, now this happens:

    Line 347: [Error] (5228:1): Identifier expected in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Login.scar

    and this is what script looks like now:
    program script;
    {.Include srl/srl.Scar}
    const
    Message1='lending out godsword!';

    procedure lending;
    begin
    wait(4000)+random(1000));
    TypeSend(Message1);
    end;


    begin
    ActivateClient;
    repeat
    lending;
    until(false)
    end.

    (how do you put script in thing like you did when u post)

  6. #6
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Redownload SRL
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  7. #7
    Join Date
    Sep 2008
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i had this same semicolon problem. It is most likely caused by some other careless mistake, i have done it so many times.
    [CENTER]http://dragcave.net/image/UrBf.gif http://dragcave.net/image/WZUX.gifurl=http://dragcave.net/view/5Kuf]http://dragcave.net/image/5Kuf.gif[/url] http://dragcave.net/image/tLMl.gif[CENTER]
    Click on the eggs and help hatch my dragon!!

  8. #8
    Join Date
    May 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok so i redownloaded srl, but i dont think that was the problem. (I had just updated it before making this script)

    Well here is another problem....
    Line 8: [Error] (16116:11): Identifier expected in script

    here is my script:
    program script;
    {.Include srl/srl.Scar}
    const
    Message1='lending out godsword!';

    procedure lending;
    begin
    wait(4000)+random(1000);
    TypeSend(Message1);
    end;


    begin
    ActivateClient;
    repeat
    lending;
    until(false)
    end.

  9. #9
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok to put it in scar format type
    [ then scar then another ]
    SCRIPT HERE
    then to end it type in [ then /scar then another ]

    Alrighty and your next promblem:
    Line 8: [Error] (16116:11): Identifier expected in script
    Make it look like this:
    wait(4000+random(1000));
    there you go if you need anymore help just post

    ~lVlaverick~

  10. #10
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    this is bugging me, never ever ever ever ever EVER use repeat(false);

    i know your a beginer but its really oneof my pet peves, what that does is keep repeating for ever and ever.

    SCAR Code:
    program script;
    {.Include srl/srl.Scar}

    var
    counter: integer;

    const
    Message1='lending out godsword!';

    procedure lending;
    begin
    wait(4000+random(1000));
    writeln(Message1);
    counter:=counter+1; //this counts how many times you have used the procedure, and ever time you do, it adds one, make sure you declare it as an integer in variables
    end;


    begin
    ActivateClient;
    repeat
    lending;
    until(counter=5{or how many times you want to use it})
    end.

    orrr what a lot of people dont is label,:

    SCAR Code:
    program script;
    {.Include srl/srl.Scar}

    var
      counter: integer;

    label
      ReDo;//you can name this any thing.

    const
      Message1='lending out godsword!';

    procedure lending;
    begin
      wait(4000+random(1000));
      writeln(Message1);
      counter:=counter+1; //this counts how many times you have used the procedure, and ever time you do, it adds one, make sure you declare it as an integer in variables
    end;


    begin
      ActivateClient;
      ReDo:
      lending;
      if counter < 5 then goto ReDo;
    end.

    when you get into more complex scripts with more repeats you will find yourself using this a lot more, i find that its very usefull

    hope i helped =D you dont need to give me rep

  11. #11
    Join Date
    May 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for all the help guys, really appreciate it

    i tried it ur way awkward and it didnt work for me :\, said this:
    Line 8: [Error] (16116:6): 'BEGIN' expected in script C:\Program Files\SCAR 3.15\Scripts\my script (more advanced).scar

    but my way did work once i fixed it like |v|averick said

  12. #12
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    wait yeah, i made my examples in writeln, just so i can test to make sure i did it right, make sure you change that if you use haha

  13. #13
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah anytime pm me if you need more help

    ~lVlaverick~

  14. #14
    Join Date
    May 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    now i got to try to make more advanced script, like auto miner or wood cutter. (maybe banking with it)...might need lots of help with that =P

  15. #15
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha just post and we'll help you :P

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
  •