SRL Archive - SRL Archives

GetMinimapDotsIn phails


marpis

2009-06-03 04:17:30

it has a line that goes something like
if (DotType = 'player') then (DotType = 'white') dec(result);

and it results TPointarray.

[Runtime Error] : Could not call proc in line 732 in script D:\SCAR 3.20\includes\SRL/SRL/Core/Mapwalk.scar

Cazax

2009-06-03 04:25:54

Fix:
function GetMiniMapDotsIn(WhatDot: String; x1, y1, x2, y2: Integer): TPointArray;
var
Color: Integer;
begin
WhatDot := LowerCase(WhatDot);
case WhatDot Of
'npc', 'yellow' : Color := 60909;
'cape', 'blue' : Color := 12742980;
'item', 'red' : Color := 789758;
'player', 'white' : Color := 16711422;
'friend', 'green' : Color := 61440;
end;
FindColorsSpiralTolerance(MMCX, MMCY, Result, Color, x1, y1, x2, y2, 0);
RAaSTPA(Result, 4);
if (WhatDot = 'player') or (WhatDot = 'white') then
begin
InvertTPA(Result);
SetLength(Result, Length(Result) - 1);
InvertTPA(Result);
end;
end;

/me slaps nava

ZephyrsFury

2009-06-03 05:30:15

/me slaps navatwo as well.

Added. Thanks for the find marpis and the fix Cazax.

Nava2

2009-06-03 08:11:48

/slaps the rest of the devs. You could have noticed it too.

ShowerThoughts

2009-06-03 14:43:39

Good teamwork boys, we've fixed this, so stop complaining =/.

Naum

2009-06-03 18:59:59

Why don't I get a slap ? I helped :D

marpis

2009-06-04 02:11:50

/slaps nauman and devs, test before publish!
edit: good work on fixing anyways, not whining! ^^