rj
2013-03-16 18:07:18
So I am trying to edit Radial walk so I can add it to my SS include, and I get this error:
And Simba Opens up globals.simba
My Mapwalk Include looks like:
Error: Exception: The bitmap[0] does not exist at line 664And Simba Opens up globals.simba
My Mapwalk Include looks like:
function SS_RadialWalkEx(var TPA: TPointArray; cx, cy, TheColor, tol: Integer; StartRadial, EndRadial: Variant; Radius: Integer): Boolean;
var
time: Integer;
SD, ED: extended;
begin
Result := False;
SD := variantToDirection(StartRadial);
ED := variantToDirection(EndRadial);
time := GetSystemTime;
try
FindColorsTolerance(tpa, TheColor, SS_MMX1, SS_MMY1, SS_MMX2, SS_MMY2, tol);
FilterPointsPie(tpa, SD, ED, 10, Radius, cx, cy);
SortCircleWise(tpa, cx, cy, StartRadial, False, StartRadial > EndRadial);
Result := (Length(tpa) > 0);
except
srl_Warn('RadialWalkEx', 'An exception has occured', warn_AllVersions); Exit;
end;
srl_Warn('RadialWalkEx', 'Took ' + IntToStr(GetSystemTime - time) +
' ms, found' + IntToStr(Length(TPA)) + ' points', warn_Debug);
end;
function SS_RadialWalk(TheColor: Integer; StartRadial, EndRadial: Variant; Radius, Xmod, Ymod: Integer): Boolean;
var
TPA: TPointArray;
I: Integer;
begin
Result := False;
if SS_RadialWalkEx(tpa, SS_MMCX, SS_MMCY, TheColor, 0, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
//FFlag(10);
Result := True;
Exit;
end;
end;
function SS_RadialWalkTolerance(Color: Integer; sRadial, eRadial: Variant; r, modX, modY, Tol: Integer): Boolean;
var
TPA: TPointArray;
i, h: Integer;
begin
Result := False;
if RadialWalkEx(TPA, SS_MMCX, SS_MMCY, Color, Tol, sRadial, eRadial, r) then
begin
h := High(TPA);
for i := 0 to h do
if MFNF(TPA[i].x, TPA[i].y, modX, modY) then
begin
//Result := WaitFunc(@Flag, 50, 500);
//mmouse(TPA[i].x,TPA[i].y,1,1)
Result := True
Exit;
end;
end;
end;