Results 1 to 25 of 25

Thread: My first script,but,i have one problem.

  1. #1
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My first script,but,i have one problem.

    program New;
    {.include srl/srl.scar}

    Procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active:=True;
    end;
    Procedure ChopTree;
    Var x,y: Integer;
    Begin
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, False);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('yew')or('InvFull')
    End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn))then
    Exit;
    Case;Random(8)of
    0:
    Begin
    HoverSkill('Woodcutting'),false)
    Wait(2453+random(432));
    End
    1:PickUpMouse;
    2:
    Begin
    MakeCompass('N');
    Wait(100)+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
    End;
    End;
    End;

    begin
    SetUpSRL;
    ActivateClient;
    DeclarePlayers;
    ChopTree;
    end.

    There is the code
    But where there is Red it gives me an error:
    "[Error] (25:1): Type mismatch at line 24
    Compiling failed."
    Last edited by YoHoJo; 12-21-2011 at 07:44 PM.

  2. #2
    Join Date
    Nov 2011
    Location
    Sacramento, California
    Posts
    366
    Mentioned
    4 Post(s)
    Quoted
    85 Post(s)

    Default

    you posted your username and pass on there :P

    remove that, even if it is a noob acc

    no semi-colon after begin?

    I think there might be other things wrong with it too, but thats the only thing that pertains to line 24.

  3. #3
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I will try out,its a noobish account so i dont care.!Thanks for the advice!

  4. #4
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Someone took it.LOL.Come on guys.

  5. #5
    Join Date
    Oct 2007
    Location
    Canada
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  6. #6
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks,
    There correction that sahibis made dont solve the problem,someone ?

  7. #7
    Join Date
    Dec 2011
    Location
    Texas
    Posts
    348
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Isnt this the script posted in the tutorial section?

  8. #8
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Simba Code:
    procedure ChopTree;
    var x,y: Integer;
    begin
      if FindObj(x,y,'hop',1785912, 35)Then
      begin
        Mouse(x,y,0,0, False);
        ChooseOption('Hop')
        repeat
          Wait(1200+random(250));
        until not IsUpText('Yew')or('InvFull')
      end;
    end;

    Please put your script in Simba tags from now on. It will make it easier to tell what's wrong.

  9. #9
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Problem was here
    Simba Code:
    Until not IsUpText('yew')or InvFull;
    You were making it like ('InvFull') which 1)it's not a string, and 2) it's not an uptext either.

    After fixing that you also get error of too many parathensis so fix this line to be like this:
    Simba Code:
    If (Not LoggedIn) then
    I can even just be
    Simba Code:
    If Not LoggedIn then
    ]

    Then you put a ; after case which needs not be there so do this:
    Simba Code:
    Case Random(8)of

    Then extra parathenses again here, so make it:
    Simba Code:
    HoverSkill('Woodcutting',false)

    Then for your 2nd case (Case #1) you forgot a ; after the end.
    Simba Code:
    End;
    Then for your 3rd case (Case #2) you didnt enter any command, so I just made it a wait:

    Simba Code:
    1:PickUpMouse;
    2: Wait(100);

    Then after your case statement you need an end (even though there is no begin, cases need an end for them);
    Simba Code:
    Case Random(8)of
      0:Begin
          HoverSkill('Woodcutting',false)
          Wait(2453+random(432));
        End;
      1 :PickUpMouse;
      2:   wait(100);
    End;

    Then extra parathasis again:
    Simba Code:
    Wait(100+random(133));

    Then an extra end at end of AntiBan procedure, so remove it.

    Then it compiles.

    1) When posing code, use Simba tags around it.
    2) When coding, standardize your code, meaning space it properly, go look at any popular script and see how they standardize(space out) their code nicely, it's much easier to read that way, search up a tutorial on scripting standards
    3) AS YOU CODE keep pressing Ctrl+F9 every few lines or in simba doing Script>Compile, this will tell you if there are any errors so you can fix errors as you see them, not fix a million errors in the end.

    Good Luck!

  10. #10
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Damn man!Thank you so much!You help me a lot!

    Well i get an error in line 37 with "Begin" i dont know whats going on as it is ther same as all the other "Begins".
    Last edited by YoHoJo; 12-21-2011 at 08:19 PM.

  11. #11
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    First of all no ; after begin.
    Second of all, you forgot the end after the case read by big ol post again.
    Third of all, don't quote BIG OL POSTS they are big enough aleady!
    Fourth of all, don't double post.
    Good Luck.

  12. #12
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks.!

    If i put End after Case then in line 36 it shows me an error
    Then after all this on line 41 other error.

    [Error] (37:1): Identifier expected at line 36
    Compiling failed.
    Last edited by Gaston7eze; 12-21-2011 at 08:36 PM.

  13. #13
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If i put End after Case then in line 36 it shows me an error
    Then after all this on line 41 other error.

    [Error] (37:1): Identifier expected at line 36
    Compiling failed.

  14. #14
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    copy/paste it here.
    Put simba tags around it.

  15. #15
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Gaston7eze View Post
    If i put End after Case then in line 36 it shows me an error
    Then after all this on line 41 other error.

    [Error] (37:1): Identifier expected at line 36
    Compiling failed.

    FORMAT your code.. and use code tags.. it was so hard to read :c As for your problems. The Mod above pointed them out. After Begin, don't put any ;.. and after End you must put a ;..

    For hover skill, the function definition is HoverSkill(Skill here, Action here).. Skills can be either numbers or strings as that is a variant. Actions can be False or True as its a boolean.. True is to click left, false is to right click.

    As for formatting, try to indent a little, and use the enter button more to separate lines from eachother rather than bunching them all up. That way you know which begin matches with which end..

    Simba Code:
    program New;
    {.include srl/srl.scar}

    Procedure DeclarePlayers;
    begin;
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;

        Players[0].Name :='';
        Players[0].Pass :='';
        Players[0].Nick :='';
        Players[0].Active:=True;
    end;

    Procedure ChopTree;
      Var
        x,y: Integer;
    Begin
      If FindObj(x,y,'hop',1785912, 35) Then
      begin
        Mouse(x,y,0,0, False);
        ChooseOption('Hop');
      end;

      Repeat
        Wait(1200+random(250));
      Until (not IsUpText('yew')) or InvFull;
    End;

    Procedure AntiBan;
    Begin;
      If(Not LoggedIn)then
        Exit;
      Case Random(8) of
        0:
          Begin
            HoverSkill('Woodcutting', false);
            Wait(2453+random(432));
          End;

        1:
          PickUpMouse;

        2:
          Begin;
            MakeCompass('N');
            Wait(100 + random(133));
            MakeCompass('S');
            Wait(50+random(133));
            MakeCompass('N');
          End;
      End;
    End;

    begin;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.
    I am Ggzz..
    Hackintosher

  16. #16
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    copy/paste it here.
    Put simba tags around it.
    Sorry i dont understand,what are you refering when you say "Tags"?

  17. #17
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    [simba]code here[*/simba]

    Remove the asterisk.

  18. #18
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by RISK View Post
    [simba]code here[*/simba]

    Remove the asterisk.
    Okk,ok,thanks!
    Simba Code:
    Begin;
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
     Begin
    1:PickUpMouse;
    2: Wait(100);
    End
    Begin;
    MakeCompass('N');
    Wait(100+random(133);
    MakeCompass('S');
    Wait(50+random(133);
    MakeCompass('N')
      End;
     End;

  19. #19
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Post entire thing.
    I don't see you calling the Case Random(8) of aymore, where did that line go?!

  20. #20
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Post entire thing.
    I don't see you calling the Case Random(8) of aymore, where did that line go?!
    Simba Code:
    program New;
    {.include srl/srl.scar}

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    Procedure ChopTree;
    Var x,y: Integer;
    Begin
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, False);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('yew')or InvFull
      End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn)then
    Exit;
    Case Random(8)of
    0:
    End
    Begin
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
     Begin
    1: PickUpMouse;
    2: Wait(100);
    End
    Begin
    MakeCompass('N');
    Wait(100+random(133);
    MakeCompass('S');
    Wait(50+random(133);
    MakeCompass('N')
      End;
    End;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.

  21. #21
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Error] (38:1): Identifier expected at line 37

    Simba Code:
    program New;
    {.include srl/srl.scar}

    Procedure DeclarePlayers;
    begin;
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    Procedure ChopTree;
    Var x,y: Integer;
    Begin;
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, False);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('yew')or InvFull
      End;
    Procedure AntiBan;
    Begin;
    If(Not LoggedIn)then
    Exit;
    Case Random(8)of
    0:
    End
    Begin;
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
     Begin
    1:  PickUpMouse;
    2: Wait(100);
    End
    Begin;
    MakeCompass('N');
    Wait(100+random(133);
    MakeCompass('S');
    Wait(50+random(133);
    MakeCompass('N')
      End;
    End;

    begin;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.
    Whats the error here?

  22. #22
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    BORH!
    This is like the 3rd thread about the same script. KEEP IT IN 1 THREAD!
    ALSO! I'm going to not answer any more after this until you standardize (properly space) your code! It makes me eyes sore! Read my responces on last thread, learn how to standardize code, look up a tutorial on how!

    Standarizeing will also help YOU figure out all of these errors, most are forgotten/extra begin/ends.

    MERGING THREADS!


    Simba Code:
    Procedure AntiBan;
    Begin;
      If(Not LoggedIn)then
      Exit;
      Case Random(8)of
      0:
        Begin;
        HoverSkill('Woodcutting',false)
        Wait(2453+random(432));
        End;
      1:  PickUpMouse;
      2: Wait(100);
      End;
      Begin;
        MakeCompass('N');
        Wait(100+random(133));
        MakeCompass('S');
        Wait(50+random(133));
        MakeCompass('N')
      End;
    End;

  23. #23
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    BORH!
    This is like the 3rd thread about the same script. KEEP IT IN 1 THREAD!
    ALSO! I'm going to not answer any more after this until you standardize (properly space) your code! It makes me eyes sore! Read my responces on last thread, learn how to standardize code, look up a tutorial on how!

    Standarizeing will also help YOU figure out all of these errors, most are forgotten/extra begin/ends.

    MERGING THREADS!


    Simba Code:
    Procedure AntiBan;
    Begin;
      If(Not LoggedIn)then
      Exit;
      Case Random(8)of
      0:
        Begin;
        HoverSkill('Woodcutting',false)
        Wait(2453+random(432));
        End;
      1:  PickUpMouse;
      2: Wait(100);
      End;
      Begin;
        MakeCompass('N');
        Wait(100+random(133));
        MakeCompass('S');
        Wait(50+random(133));
        MakeCompass('N')
      End;
    End;
    Yeah,i know,but if noone answer,what should i do?Wait until my thread goes down hill and noone answer me?

  24. #24
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Yes, and in the meantime you keep trying new things. Then, after a few hours, no help comes, bump the thread.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  25. #25
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Yes, and in the meantime you keep trying new things. Then, after a few hours, no help comes, bump the thread.
    Ok,thanks man!

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
  •