I get a type mismatch in this line:
SCAR Code:if DTMRotated(EdgeVille1DDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
edgeville1DDTM is declared as a TDTM.
help please.
I get a type mismatch in this line:
SCAR Code:if DTMRotated(EdgeVille1DDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
edgeville1DDTM is declared as a TDTM.
help please.
Do this:
Make a new thing with all your DDTM's in it:
Example:
SCAR Code:function LoadAllDDTMWalks(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
0: begin //Walk To Yews Begins
dtmMainPoint.x := 628;
dtmMainPoint.y := 39;
dtmMainPoint.AreaSize := 2;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := FindGERoadColourBH;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 611;
dtmSubPoints[0].y := 32;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindGERoadColourBH;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 646;
dtmSubPoints[1].y := 28;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindGERoadColourBH;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 605;
dtmSubPoints[2].y := 35;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindGERoadColourBH;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 644;
dtmSubPoints[3].y := 33;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindGERoadColourBH;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 628;
dtmSubPoints[4].y := 50;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := FindGERoadColourBH;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
Now for your thing do this:
SCAR Code:var
Walk: integer;
Walk := LoadAllDDTMWalks(0);
if DTMRotated(Walk, x, y, MMX1, MMY1, MMX2, MMY2) then
Then just free the DTM after your done, its really fast and preety good.
Look at:
http://www.villavu.com/forum/showthread.php?t=27243
If you wanna see how my proc is.
If you don't want to do that, then your DDTM should end up being assigned to a regular DTM and not a TDTM. You should have something like this:
with DTM, DDTMSkeleton, MainPoint and SubPoints replaced with the appropriate.SCAR Code:DDTMSkeleton.MainPoint := MainPoint;
DDTMSkeleton.SubPoints := SubPoints;
DTM:= AddDTM(DDTMSkeleton);
By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.
thanks, i think im going to use Bobbo's thing.
There are currently 1 users browsing this thread. (0 members and 1 guests)