Results 1 to 4 of 4

Thread: Runtime Error :(

  1. #1
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default Runtime Error :(

    Ok everyone using my script gets an error when it is about to bank:

    Code:
    [Runtime Error] : Out Of Range in line 120 in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Amount.scar
    Anyone got any advice to fix this ?

    Cheers for any help

    T~M

  2. #2
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try to be a bit more specific where it breaks in your script, and i will help you out.

    Can't read 800 lines looking for one error ;/

  3. #3
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think it's SRL's error as the part in Amount.scar that is causing the error is like this:
    SCAR Code:
    for II := 2 downto 0 do
          if (FindColorsTolerance(TPA, 7575987 * II * II - 6796134 * II + 65535, B.X1 - 10, B.Y1 - 10, B.X2 + 10, B.Y2 + 10, 0)) then
            Break;
        if (II < 0) then Exit;
    Where II never gets to be less than 0 and therefore the next line causes the error...
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That part always causes an error .

    Try using this
    SCAR Code:
    function WillowAmount : integer;
    var
      DTM, x, y, i : integer;
      Box : TBox;
    begin
      DTM := DTMFromString('blahblahblah');
      for i := 1 to 28 do
        if ExistsItem(i) then
        begin
          Box := InvBox(i);
          if FindDTM(DTM, x, y, Box.x1, Box.y1, Box.x2, Box.y2) then
            inc(result);
        end;
      FreeDTM(DTM);
    end;

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
  •