Results 1 to 12 of 12

Thread: Help with first script.

  1. #1
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with first script.

    Hey guys, earlier I was getting "Exception in script: Access violation" but I fixed it with a couple of ":"'s. Now, I have been getting a "syntax error" on this line of script
    Code:
    case Destination OF:
    Any advice on how to fix this?

  2. #2
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    take out the :

    Code:
    case example of
           1:
           2:
    end;

  3. #3
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by x[Warrior]x3500 View Post
    take out the :
    Warrior, when I do that it says "Exception in script: Access violation."

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

    Default

    What is Destination?
    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.


  5. #5
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Destination is a constant, for the choice of location on my script. It's a basic teleporter, and you can chose varrock or cammy.

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

    Default

    Could you post the script? Or more than just one line?
    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.


  7. #7
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Code:
    program new;
    var
      exampleInt : integer;
      exampleStr : String;
    
    begin
      exampleInt := random(2)+1;
    
      case exampleInt of
        1: begin writeln('1'); ExampleStr:='one'; end;
        2: begin writeln('2'); ExampleStr:='two'; end;
      end;
    
      case exampleStr of
        'one':  writeln('one');
        'two':  writeln('two');
      end;
    end.
    this is an example of a case statement with an Integer, and a String. if your case statement looks like one of these, then its correct. somewhere else in your script has the issue.
    Last edited by x[Warrior]x3500; 02-13-2012 at 11:41 PM.

  8. #8
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    const
    
      Destination        = ''    ;        //Put destination here - Cmlt, or Vrck
      Teleports          = 0     ;        //Put the desired number of teleports here
      SRLStats_User     = '';   // Your SRL Stats Username
      SRLStats_Password = '';   // Your SRL Stats Password
      SERVER            = 0;  // Enter "0" to pick a random server.
      MEMBERS           = True; //False if F2P
      BreakEvery        = 250;  // How long to bot before break
      BreakFor          = 10;    // Break Length
      NumbOfPlayers     = 1;
      StartPlayer       = 0;
    
      var
       count: integer;

    Then, after this,

    Code:
    Procedure Teleport;
    var
    x, y, Time :integer;
    
    begin
    if FindNormalRandoms or not (LoggedIn) then
            TerminateScript;
    
      case Destination OF
    
           'vrck':
    If I add a ":" to the OF, it says I have a syntax error. If not, it says "Exception in script: Access violation"


    EDIT: Lemme know if you need the full script. I appreciate the help guys
    Last edited by Solidone40; 02-13-2012 at 11:58 PM.

  9. #9
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Code:
    program new;
    {$I SRL/SRL.simba}
    const
    
      Destination        = ''    ;        //Put destination here - Cmlt, or Vrck
      Teleports          = 0     ;        //Put the desired number of teleports here
      SRLStats_User     = '';   // Your SRL Stats Username
      SRLStats_Password = '';   // Your SRL Stats Password
      SERVER            = 0;  // Enter "0" to pick a random server.
      MEMBERS           = True; //False if F2P
      BreakEvery        = 250;  // How long to bot before break
      BreakFor          = 10;    // Break Length
      NumbOfPlayers     = 1;
      StartPlayer       = 0;
    
      var
       count: integer;
    
    
    Procedure Teleport;
    var
    x, y, Time :integer;
    
    begin
      if FindNormalRandoms or not (LoggedIn) then
        TerminateScript;
    
      case Destination OF
        'vrck':
      end;
    end;
    
    begin
      setupsrl;
      teleport;
    end.
    it sucessfully compiles for me

    EDIT: since this compiles for me, it cant really be in that part of the script :/ i think we need to actually see the script
    Last edited by x[Warrior]x3500; 02-14-2012 at 01:57 AM.

  10. #10
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here she is. The script shou,d work as it, minus the error lol. Thanks for the help guys.

    Code:
    program SolidTeleport;                   //by Solidone40
    {$DEFINE SMART}                          //Post your proggys/bugs!
    {$DEFINE SRL5}
    {$i SRL/srl.simba}
    
    const
    
      Destination        = ''    ;        //Put destination here - Cmlt, or Vrck
      Teleports          = 0     ;        //Put the desired number of teleports here
      SRLStats_User     = '';   // Your SRL Stats Username
      SRLStats_Password = '';   // Your SRL Stats Password
      SERVER            = 0;  // Enter "0" to pick a random server.
      MEMBERS           = True; //False if F2P
      BreakEvery        = 250;  // How long to bot before break
      BreakFor          = 10;    // Break Length
      NumbOfPlayers     = 1;
      StartPlayer       = 0;
    
      var
       count: integer;
    
    procedure DeclarePlayers;
    
     begin
        HowManyPlayers := 1;                  //If you really want more, copy+paste
        NumberOfPlayers(HowManyPlayers);      //the form.
        CurrentPlayer := 0;
    
        with Players[0] do
         begin
          Name         := '';
          Pass         := '';
          BoxRewards   := ['XP','xp','lamp'];
          Pin          := '';
          Active       := True;
         end;
     end;
    Procedure Setup;
    
    begin
      Smart_Members := False;
      Smart_Server := 0;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    
      Count:=0;
      Wait(1000+Random(250));
      FindNormalRandoms;
    end;
    
    
    Procedure Teleport;
    var
    x, y, Time :integer;
    
    begin
    if FindNormalRandoms or not (LoggedIn) then
            TerminateScript;
    
      case Destination OF
    
           'vrck':
    
           GameTab(tab_magic);
           wait (30 + random(400)):
           MoveMouse (671, 279);
      begin
          repeat
          MarkTime(Time);
          ClickMouse(x + random (5), y + random (5), 1, True);
          wait (5800 + random (1400));
          if FindBlackChatMessage('aw runes') then TerminateScript;
          or if FindBlackChatMessage('ire runes') then TerminateScript;
          or if FindBlackChatMessage('ir runes') then TerminateScript;
          until (False);
          end;
    
          'cmlt':
    
           GameTab(tab_magic);
           wait (30 + random(400)):
           MoveMouse (648, 635);
      begin
          repeat
          MarkTime(Time);
          ClickMouse(x + random (5), y + random (5), 1, True);
          wait (5800 + random (1400));
          if FindBlackChatMessage('aw runes') then TerminateScript;
          or if FindBlackChatMessage('ir runes') then TerminateScript;
          until (False);
          end;
    end;
    end;
    
     Procedure Antiban;
    Begin
      if(not(LoggedIn))then
      exit;
      FindNormalRandoms;
        Case Random(80) Of:
        1: HoverSkill('magic', False);
        2: HoverSkill('random', False);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: PickUpMouse;
        6: RandomMovement;
        7: RandomRClick;
      end;
    end;
    
    Procedure MiniBreaker;
    Begin
    
      Case Random (120) Of:
        1: Wait(430000 + random(7406))
        2: Wait(55500 + random(8550))
        3: Wait(220040 + random(6759))
        4: Wait(34400 + random(2549))
      end;
    end;
    procedure Proggy;
    
      begin
        WriteLn(// Progress Report \\');
        WriteLn('Time Running: '+TimeRunning);
        WriteLn('Teleports: ' +IntToStr(count));
        WriteLn('//SolidTele by Solidone40\\');
    
      end;
      begin
      Smart_Signed := TRUE;
      Smart_Members := MEMBERS;
      Smart_SuperDetail := FALSE;
      activateClient;
      SetupSRL;
      DeclarePlayers;
        if not (LoggedIn) then
      LoginPlayer;
      wait(5000+random(600));
      repeat
      Teleport;
      Antiban;
      Minibreaker;
      until (count=loadcount) or (not LoggedIn)
      Writeln('Script Finished');
      Proggy;
    end.

  11. #11
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    wow ok, lots of issues:

    1. line 126. u forgot a '
    2. line 103. get rid of the :
    3. line 117. get rid of the :
    4. line 118-121. end statements with ;
    5. line 147. u havn't created the variable loadcount. u need to create it globally
    6. move line 70 to line 66
    7. move line 86 to line 82
    8. line 68 needs a ; not a :
    9. line 73 has too many parameters. get rid of true
    10. line 75. get rid of "then TerminateScript;"
    11. line 76. get rid of "if" and "then TerminateScript;"
    12. line 77.get rid of "if"
    13. line 84 needs a ; not a :
    14. line 89 has too many parameters. get rid of true
    15. line 91. get rid of "then TerminateScript;"
    16. line 92.get rid of "if"

    do u even debug your code? lol

  12. #12
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks my man. And it's my first script, go easy on me haha. I was headstrong, and didn't pay much attention to detail. And what is this debugging of code that you speak of haha it sounds as though it could make my life much easier

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
  •