So I use SPS for walking on one of my runecrafting scripts, I have the map in the correct location includes/sps/img/runescape_surface.
I load it correctly Sps.Setup('0_0map', runescape_surface);
I was using the script a couple of weeks ago but havent used it or changed it since then, today I tried to run it and got this error
Simba Code:
---- FATAL ERROR: sps.setup(): Unable to load map or bitmap to map failed
Successfully executed.
Have updated my srl and sps, updated simba. I open the script from its file not threw simba's recently used. The map is a .png file which has worked for years.
I really cant figure out why it will not work. Any help is much much appreciated. I am using sps-rs3 by the way.
The procedure which is throwing up the error from sps-rs3 is the following.
Simba Code:
(*
Loads and setups the TSPSArea.
Example:
sps.setup('my_map_name', RUNESCAPE_SURFACE, 4, 600.0, 0.40);
*)
procedure TSPSArea.setup(imgName, imgFolder: string; accuracy: integer; tolerance, minMatchPercent: extended);
var
bmp: TMufasaBitmap;
t: integer;
m: extended;
begin
print(self.getName()+'.init()', TDebug.HEADER);
t := getSystemTime();
if (fileExists(SPS_IMG_PATH + imgFolder + imgName + SPS_IMG_FMT)) then
begin
print('Path exists ('+SPS_IMG_PATH + imgFolder + imgName + SPS_IMG_FMT+')');
self._accuracy := accuracy;
self._tolerance := tolerance;
self._minMatchPercent := minMatchPercent;
self.__mapPath := SPS_IMG_PATH + imgFolder + imgName + SPS_IMG_FMT;
if (spsAnyAngle) then
self._minMatchPercent := 0.10;
try
bmp.init(client.getMBitmaps());
bmp.loadFromFile(self.__mapPath);
SPS_BitmapToMap(bmp, self._accuracy, self.__areaMap);
except
print(self.getName()+'.setup(): Unable to load map or bitmap to map failed', TDebug.FATAL);
finally
bmp.free();
end;
self.isSetup := true;
end else
print(self.getName()+'.setup(): Unable to find map, searched path '+ SPS_IMG_PATH + imgFolder + imgName + SPS_IMG_FMT, TDebug.FATAL);
print('Setup area "' + imgName + '" in ' + intToStr(getSystemTime() - t) + 'ms');
print(self.getName()+'.init()', TDebug.FOOTER);
end;