Log in

View Full Version : Custom SPS Map Problem



Spiker
04-11-2012, 11:53 PM
I thought I followed all the steps pretty well, but apparently I missed something.

I added:

TAVERLY: //Line 100
with SPS_Surface do
begin
Name := 'Taverly';
ImagePath := SPS_IMG_PATH + 'taverly\';
FactorX := 400;
FactorY := 400;
TileOffsetX := -1;
TileOffSetY := -1;
Tolerance := 0.3;
end;

And received:


[Error] (101:5): Unknown identifier 'TAVERLY' at line 100
Compiling failed.

Then I added:

// Supported SPS surfaces
RUNESCAPE_SURFACE = 1;
DUNGEON_ESSENCE_MINE = 2;
DWARVEN_MINE = 3;
RUNECRAFTING_ALTARS = 4;
TAVERLY = 5; //this line

And received:


[Error] (149:34): Unknown identifier 'MMCX' at line 148
Compiling failed.

// Gets the map pieces that appear on the minimap
function SPS_GatherMinimap: T3DIntegerArray;
var
bmp: TMufasaBitmap;
c: TClient;
begin
try
bmp := TMufasaBitmap.Create;
bmp.SetSize(100, 100);

c := getTClient;
bmp.CopyClientToBitmap(
c.IOManager, false, 0,0, MMCX-50, MMCY-50, MMCX+50, MMCY+50 //Line 148
);

Result := SPS_BitmapToMap(bmp);
finally
bmp.free;
except
SPS_DebugStr('[ERROR] in SPS_GatherMinimap: '+ExceptionToString(ExceptionType, ExceptionParam));
SPS_WarnUser('SPS_GatherMinimap', ExceptionToString(ExceptionType, ExceptionParam));
end;
end;

I've already made the 500x500 image with a black background and placed it in the folder I've correctly named.

Thanks in advance for any help.

Spiker
04-12-2012, 12:52 AM
Apparently there wasn't a problem, I just couldn't compile sps because I needed the srl include.

/facepalm