Results 1 to 10 of 10

Thread: Error Message! Plz help, you will help the production of a great script

  1. #1
    Join Date
    Apr 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Error Message! Plz help, you will help the production of a great script

    I was running this peice of code:

    if(NoPick = true) then
    begin
    Withdraw(1,1,1);
    CloseBank;
    Mouse(ItemCoords(1).X,ItemCoords(1).Y,5,5,true);
    NoPick:= false;
    end
    else
    CloseBank;

    I got this error:

    [Runtime Error] : Out of Global Vars range in line 143 in script H:\SCAR 3.15\Scripts\MyAutoMiner.scar

    srry if i hav done anything nooby, i am new, but this will be a good script when it's finished

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Uuh. SRL error. I would delete all SRL includes then checkout revision again.

    And, by the way, I would reccomend to improove that code:
    SCAR Code:
    if NoPick then
    begin
      Withdraw(1,1,1);
      CloseBank;
      Mouse(ItemCoords(1).X,ItemCoords(1).Y,5,5,true);
      NoPick:= false;
    end
    else
    CloseBank;

    ..

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Try this:

    SCAR Code:
    {.include srl/srl.scar}
    {.include srl/srl/skill/mining.scar}

    Procedure Stuff;
    Var
    I:Integer;
    Begin
      if(NoPick = true) then
        begin
          Withdraw(1,1,1);
          CloseBank;
          I := 1;
          Mouse(ItemCoords(i).X, ItemCoords(i).Y, 5, 5, true);
          NoPick:= false;
        end
       else
       CloseBank;
    end;

    Copy and Paste It Into SCAR, all I can think about is you need SRL/SRL.SCAR at the top

    Hope I Helped

  4. #4
    Join Date
    Apr 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks, but would you mind telling what you see wrong with that code?

    Edit:my includes are above all of my code except the "program AutoMiner;" part, if thats what you meaned

  5. #5
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    u remembered SetupSRL; at the beginning of your main loop?

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    No Its just That {.include srl/srl.scar} must be included on top of: {.include srl/srl/skill/mining.scar}


  7. #7
    Join Date
    Apr 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Zytex!: not in my main loop, but it is there

    NaumanAkhlaQ: yes the SRL include is above the mining one

    thanks for trying to help all of you, but i dont think any of these is the problem

  8. #8
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by thomaswood5 View Post
    Zytex!: not in my main loop, but it is there

    NaumanAkhlaQ: yes the SRL include is above the mining one

    thanks for trying to help all of you, but i dont think any of these is the problem
    SetUpSRL; Must be called before you use any function else it will give many errors; will stop working also.
    ~Hermen

  9. #9
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    TP := ItemCoords(1);
    TP.X, Tp.Y

    should do it

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  10. #10
    Join Date
    Apr 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the help everyone, but i managed to fix it myself, i replaced:

    Code:
    if(NoPick = true) then
    begin
    Withdraw(1,1,1);
    CloseBank;
    Mouse(ItemCoords(1).X,ItemCoords(1).Y,5,5,true);
    NoPick:= false;
    end
    else
    CloseBank;
    with:

    Code:
      if(NoPick) then
        Withdraw(1,1,1);
      CloseBank;
      if(NoPick) then
      begin
        Mouse(ItemCoords(1).X,ItemCoords(1).Y,5,5,true);
        NoPick:= false;
      end;
    Seemed to work, i will be posting this script soon!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Same error message every script.
    By RSplaya1 in forum OSR Help
    Replies: 1
    Last Post: 09-20-2008, 01:43 AM
  2. Always get same Error Message
    By WithoutFear in forum OSR Help
    Replies: 3
    Last Post: 06-30-2008, 02:28 AM
  3. error message?
    By XcanadamanX in forum OSR Help
    Replies: 5
    Last Post: 11-11-2006, 06:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •