Results 1 to 15 of 15

Thread: Help an old timer get going again

  1. #1
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default Help an old timer get going again

    The goal here is to run an RS3 script, simply to make sure I have everything setup properly and working.

    The script in question is The Mayor's dungeon miner. Everything compiles and SMART loads, then I get:
    Simba Code:
    ---- FATAL ERROR: sps.setup(): Unable to load map or bitmap to map failed
    Successfully executed.
    The following bitmaps were not freed: [5]

    Everything is up to date, the file paths used in script are correct, etc.


    A lot has changed in the time I've been gone; any help would be appreciated.

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    You're not the only one getting that error man, it's stopping me from running any SPS script :/

  3. #3
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Sin View Post
    You're not the only one getting that error man, it's stopping me from running any SPS script :/
    Oh I see. I was under the impression this was an isolated incident.

    Thanks for the input.

  4. #4
    Join Date
    Feb 2013
    Posts
    342
    Mentioned
    8 Post(s)
    Quoted
    110 Post(s)

    Default

    Does it log you in before the error?

    I'm just running to the mine to see if i get the error.

    E: too late, sorry.

    Well I went into the mine, started the script and it was happy running around for the ores?
    Last edited by GetHyper; 07-27-2015 at 05:44 PM.

  5. #5
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Quote Originally Posted by Sin View Post
    You're not the only one getting that error man, it's stopping me from running any SPS script :/
    Quote Originally Posted by NCDS View Post
    Oh I see. I was under the impression this was an isolated incident.

    Thanks for the input.
    Maybe you two could see what your systems have in common and find the issue?
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  6. #6
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by GetHyper View Post

    Well I went into the mine, started the script and it was happy running around for the ores?
    Quote Originally Posted by Hawker View Post
    Maybe you two could see what your systems have in common and find the issue?
    Interesting. I'm running Win7 Ultimate atm, never had any issues with this OS before.

  7. #7
    Join Date
    Feb 2013
    Posts
    342
    Mentioned
    8 Post(s)
    Quoted
    110 Post(s)

    Default

    Well I'm running w8.1 pro. I wouldn't have thought that would make a difference though :/.

    Have you tried reinstalling simba?

  8. #8
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by GetHyper View Post
    Well I'm running w8.1 pro. I wouldn't have thought that would make a difference though :/.

    Have you tried reinstalling simba?
    Yes, I re-installed everything before asking.

    I'll figure it out eventually; off to work now though.

  9. #9
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    annyway. as i said in irc, <Turpinator> maybe you are the other 1/999999999999999999 people that have an issue with the sps dll.
    (the first being Sin)

    So for him we just override all the functions in sps.dll with functions in sps-rs3.simba. yes, it is ?slower? not being an external library, but meh.

    So all these functions...
    https://github.com/SRL/SPS/blob/mast...source/sps.lpr
    were put into sps-rs3.simba as overrides.

    ie.
    Code:
    procedure SPS_BitmapToMap(bmp: TMufasaBitmap; SideLength: integer; var res: T3DIntegerArray); callconv
    changes to
    Code:
    procedure SPS_BitmapToMap(bmp: TMufasaBitmap; SideLength: integer; var res: T3DIntegerArray); override;
    and a few lines to be changed, such as
    Code:
      HighX := Trunc(bmp.Width / (SideLength * 1.0));
      HighY := Trunc(bmp.Height / (SideLength * 1.0));
    to
    Code:
      HighX := Trunc(bmp.getWidth / (SideLength * 1.0));
      HighY := Trunc(bmp.getHeight / (SideLength * 1.0));
    And from there, checked if it worked, then slowly removed functions until it didnt, so that we could find the offending one. i swear it was SPS_BitmapToMap(), but meh.

  10. #10
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Well, that would make sense (I guess) given the error thrown. However, I already tried replacing sps-rs3.simba with the overrides you sent me, to no a avail unfortunately.

    I'll see if I can figure it out tonight when I get home and update with any progress made.

  11. #11
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Tried to run a script the other day and got the same error I guess that makes me the second/third guy

  12. #12
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    I've also received this error many times on certain Simba installations. Reinstalling did nothing, and writeln debugging didn't give me any answers. Set up a VM with a fresh installation and everything worked fine. I still don't know what the difference was between the VM setup and my main setup! Would be cool to finally figure this out.

  13. #13
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Next up on the list of things I can' explain..
    Simba Code:
    Error: The given DTM Index[0] doesn't exist at line 730

    is thrown when executing this:
    Simba Code:
    function drop(): boolean;
    var
      t: integer;
      pts: tpointarray;
    begin
      if not isLoggedIn then
        exit(false);

      if not tabBackpack.open() then
      begin
        print('Failed to open tab.Backpack.');
        exit(false);
      end;

      if tabBackpack.isEmpty() then
        exit(true);

      t := getSystemTime + 15000;
      while tabBackpack.countDTM(oreDTM) > 0 do
      begin
        if t < getSystemTime then
        begin
          print('Timed out while dropping Ore.');
          exit(false);
        end;
        sendKeys(toStr(quickKey), 100+random(500), 100+random(500));
        wait(randomRange(3000, 8000));
      end;
      result := tabBackpack.countDTM(oreDTM) < 1;
    end;

    line 730 is the resulting line of the following function in wrappers.simba
    Simba Code:
    function findDTM(dtm: integer; var x, y: integer; searchBox: TBox): boolean; overload;
    begin
      result := findDTM(dtm, x, y, searchBox.x1, searchBox.y1, searchBox.x2, searchBox.y2);
    end;


    I've searched the forum and found that other people with a similar error had a "bad" DTM. I've remade this 3 ties now with the same outcome.

    I can run other scripts which use the same DTM function with no problem.

    Any ideas?

  14. #14
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    @NCDS; did you declare the DTM and then free it and try to call it again?

  15. #15
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by rj View Post
    @NCDS; did you declare the DTM and then free it and try to call it again?
    Not entirely sure what I changed, but it seems to be working now. Hopefully we're past all the foolish questions now.

    Thanks!

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
  •