SRL Archive - OSR Intermediate Scripting Tutorials

A video guide to DDTM walking!


King

2013-05-06 23:22:05

Hey all, finally got around to posting this <3

[YOUTUBE]ExbqObeERHk[/YOUTUBE]



Code for the script mentioned:

Example of DDTM being called in a function to load it.

function LoadDDTMWalk(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1: begin

begin
dtmMainPoint.x := 1122;
dtmMainPoint.y := 177;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 931654;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1122;
dtmSubPoints[0].y := 177;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 931654;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1119;
dtmSubPoints[1].y := 167;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12161405;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1121;
dtmSubPoints[2].y := 187;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 12161405;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1128;
dtmSubPoints[3].y := 177;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 931654;
dtmSubPoints[3].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;




2: begin

dtmMainPoint.x := 1129;
dtmMainPoint.y := 141;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 3104640;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1129;
dtmSubPoints[0].y := 141;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 3104640;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1108;
dtmSubPoints[1].y := 154;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12161405;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1111;
dtmSubPoints[2].y := 161;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 12161405;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1154;
dtmSubPoints[3].y := 161;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 931654;
dtmSubPoints[3].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;


//'''''''''''''''''''''''''''''''''''''''''\\
// Walking to Altar \\
//'''''''''''''''''''''''''''''''''''''''''\\
3: begin
dtmMainPoint.x := 1111;
dtmMainPoint.y := 203;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 2264190;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1111;
dtmSubPoints[0].y := 203;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 2264190;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1137;
dtmSubPoints[1].y := 220;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 11036250;
dtmSubPoints[1].Tolerance := 35;

dtmSubPoints[2].x := 1134;
dtmSubPoints[2].y := 149;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 610078;
dtmSubPoints[2].Tolerance := 35;

dtmSubPoints[3].x := 1117;
dtmSubPoints[3].y := 144;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 610078;
dtmSubPoints[3].Tolerance := 35;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

4: begin
dtmMainPoint.x := 1113;
dtmMainPoint.y := 228;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7369593;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1113;
dtmSubPoints[0].y := 228;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7369593;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1133;
dtmSubPoints[1].y := 215;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 610078;
dtmSubPoints[1].Tolerance := 35;

dtmSubPoints[2].x := 1112;
dtmSubPoints[2].y := 211;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 11036250;
dtmSubPoints[2].Tolerance := 35;

dtmSubPoints[3].x := 1103;
dtmSubPoints[3].y := 197;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 610078;
dtmSubPoints[3].Tolerance := 35;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

5: begin
dtmMainPoint.x := 1114;
dtmMainPoint.y := 216;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7369593;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1114;
dtmSubPoints[0].y := 216;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7369593;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1095;
dtmSubPoints[1].y := 250;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12161405;
dtmSubPoints[1].Tolerance := 35;

dtmSubPoints[2].x := 1097;
dtmSubPoints[2].y := 212;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 610078;
dtmSubPoints[2].Tolerance := 35;

dtmSubPoints[3].x := 1114;
dtmSubPoints[3].y := 236;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 931654;
dtmSubPoints[3].Tolerance := 35;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;



end;
end;


Example of DDTM in use.

function WalkToAltar: Boolean;
var
WalkDTM: integer;
aFound: Extended;
begin
WalkDTM := LoadDDTMWalk(3);
if FindDTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2, Pi/2, Pi/30, aFound) then
begin
Mouse(X, Y, 2, 2, True);
FFlag(0);
WriteDebug('Balloon Point 1 done');
end
else
WriteDebug('Cant find the DDTM');


WalkDTM := LoadDDTMWalk(4);
if FindDTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2, Pi/2, Pi/30, aFound) then
begin
Mouse(X, Y, 2, 2, True);
FFlag(0);
WriteDebug('Balloon Point 2 done');
end
else
writedebug('Cant find the DDTM');

WalkDTM := LoadDDTMWalk(5);
if FindDTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2, Pi/2, Pi/30, aFound) then
begin
Mouse(X, Y, 2, 2, True);
FFlag(0);
WriteDebug('Balloon Point 1 done');
end
else
WriteDebug('Cant find the DDTM');
end;

Didnt cover this in the video, should have.

How to AutoColor points:

Credit to NKN for writing the code for me in skype!

function FindTheColor(color: integer): Integer;
var
x,y:integer;
TPA:TPointArray;
begin
if FindColorSpiralTolerance(x, y, color, MMX1, MMY1, MMX2, MMY2, 30) then

result := GetColor(x, y)
else
result := -1;
end;

How to use it in a DDTM procedure :

function LoadDDTMWalk(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1: begin

begin
dtmMainPoint.x := 1122;
dtmMainPoint.y := 177;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 931654;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1122;
dtmSubPoints[0].y := 177;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 931654;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1119;
dtmSubPoints[1].y := 167;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindTheColor(12161405);
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1121;
dtmSubPoints[2].y := 187;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindTheColor(12161405);
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1128;
dtmSubPoints[3].y := 177;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindTheColor(931654);
dtmSubPoints[3].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;

This Auto-Colors the point to find it a bit better. Another way to do this is to use ACA's AutoColor function and implement it just like this.

http://villavu.com/forum/showthread.php?t=25312

^Link to the editor

Sjoe

2013-05-07 00:00:23

Sexy voice ;)

King

2013-05-07 00:02:29

From: Sjoe
Sexy voice ;)


Thanks babe ;)

Sjoe

2013-05-07 00:10:37

Watched it, it's good :)

But re-testing a DDTM should be with changing worlds.

King

2013-05-07 00:20:45

From: Sjoe
Watched it, it's good :)

But re-testing a DDTM should be with changing worlds.


I thought I said to change worlds? That was like the 5th or 6th time I logged into RS to test that DDTM :D

Sjoe

2013-05-07 00:49:01

From: King
I thought I said to change worlds? That was like the 5th or 6th time I logged into RS to test that DDTM :D


Ooh sorry, didn't see you log out that's why lol.

King

2013-05-07 01:06:01

From: Sjoe
Ooh sorry, didn't see you log out that's why lol.


I edited out the logo it's :p

barb_of_all

2013-05-07 15:03:17

Keep 'em coming! That was great

King

2013-05-07 15:23:36

From: barb_of_all
Keep 'em coming! That was great


Post any requests you may have :P

StickToTheScript

2013-05-07 15:51:13

Good job! I enjoyed it! Do another!

King

2013-05-07 16:43:16

From: StickToTheScript
Good job! I enjoyed it! Do another!


Can you think of some to do? Im open to anything :P

StickToTheScript

2013-05-07 16:44:35

From: King
Can you think of some to do? Im open to anything :P


Are you good with TPAs? Lots of people seem to be having trouble with those. Plus, a video on that would be stinking amazing! I would for sure give it a watch!

TheeMason

2013-05-07 17:01:27

From: StickToTheScript
Are you good with TPAs? Lots of people seem to be having trouble with those. Plus, a video on that would be stinking amazing! I would for sure give it a watch!


It was an amazing guide! It is great now to have an alternate to sps walking!
Yes another! A guide to TPAs would be fantastic!
+Rep whatever I can give!

StickToTheScript

2013-05-07 17:04:01

From: TheeMason
It was an amazing guide! It is great now to have an alternate to sps walking!
Yes another! A guide to TPAs would be fantastic!


@King

I told you.

Kasi

2013-05-07 17:04:57

Great Tut, should add an explanation of ddtm offsets.

King

2013-05-07 17:15:47

From: StickToTheScript
Are you good with TPAs? Lots of people seem to be having trouble with those. Plus, a video on that would be stinking amazing! I would for sure give it a watch!


Im pretty good with TPA's, Ill do a few videos on them, basic, intermediate and advanced!

From: TheeMason
It was an amazing guide! It is great now to have an alternate to sps walking!
Yes another! A guide to TPAs would be fantastic!
+Rep whatever I can give!


Working on the first video tongiht :P

From: StickToTheScript
@King

I told you.

:P

From: Kasi
Great Tut, should add an explanation of ddtm offsets.


I can add a text part to it if you like, are you talking about in the editor? If I am right, doesn't it just make the point it returns offset either by x or y that much? So I could have a DDTM that then clicks to so many spaces to the right left ect?

StickToTheScript

2013-05-07 17:18:27

From: King
Im pretty good with TPA's, Ill do a few videos on them, basic, intermediate and advanced!

Working on the first video tongiht :P

I can add a text part to it if you like, are you talking about in the editor? If I am right, doesn't it just make the point it returns offset either by x or y that much? So I could have a DDTM that then clicks to so many spaces to the right left ect?


I would love to see those 3 tutorials. And please add the text part. The more info, the better.

King

2013-05-07 17:23:07

From: StickToTheScript
I would love to see those 3 tutorials. And please add the text part. The more info, the better.


I will do them tonight, I will cover basic TPA finding functions to MMToMSEx and functions with finding with that, to ATPA's ect. I will also brush up on wrappers to hopefully be able to explain those as well, if I remember wrappers stop memory leaks?

StickToTheScript

2013-05-07 17:25:11

From: King
I will do them tonight, I will cover basic TPA finding functions to MMToMSEx and functions with finding with that, to ATPA's ect. I will also brush up on wrappers to hopefully be able to explain those as well, if I remember wrappers stop memory leaks?


I look forward to learning your knowledge!! :D Its gonna be great!!

But, I am not good with wrappers, so dont ask me about those… Lol.

Kasi

2013-05-07 17:31:51

From: King

I can add a text part to it if you like, are you talking about in the editor? If I am right, doesn't it just make the point it returns offset either by x or y that much? So I could have a DDTM that then clicks to so many spaces to the right left ect?


Yer, you got it, its because in your video you were talking about not knowing how often the dock would show up, if you selected a mainpoint which is more reliable I.E one closer to the center of the compass then you could just add an offset to where you wanna click in relation to where your reference point was found. Remember to add the offset with the compass angle taken into account. You can do this by rotating the offset in point form (Point(X, Y)) by the angle the ddtm is found (i think the function is called RotatePoint). FindDTMRotated returns the angle in radians at which the ddtm was found, in your case this variable was aFound.

King

2013-05-07 17:45:50

From: StickToTheScript
I look forward to learning your knowledge!! :D Its gonna be great!!

But, I am not good with wrappers, so dont ask me about those… Lol.


Lol :D I hope it goes well..Im not the best with wrappers either XD

From: Kasi
Yer, you got it, its because in your video you were talking about not knowing how often the dock would show up, if you selected a mainpoint which is more reliable I.E one closer to the center of the compass then you could just add an offset to where you wanna click in relation to where your reference point was found. Remember to add the offset with the compass angle taken into account. You can do this by rotating the offset in point form (Point(X, Y)) by the angle the ddtm is found (i think the function is called RotatePoint). FindDTMRotated returns the angle in radians at which the ddtm was found, in your case this variable was aFound.


Ill add that into the main post :P

StickToTheScript

2013-05-07 17:50:46

From: King
Lol :D I hope it goes well..Im not the best with wrappers either XD


I feel your pain… :P

Haxz

2013-05-07 17:55:23

From: King
if I remember wrappers stop memory leaks?


Yep, I used wrappers in all my TPA finding functions to avoid memory leaks.

Ian

2013-05-07 18:29:30

[YOUTUBE]ExbqObeERHk[/YOUTUBE]

StickToTheScript

2013-05-07 19:54:18

Forgot to ask…

Do you care that ur username is showing? (Im guessing not)


oh, You should upload that Law Rune Runner… :p

King

2013-05-07 20:02:19

From: StickToTheScript
Forgot to ask…

Do you care that ur username is showing? (Im guessing not)


oh, You should upload that Law Rune Runner… :p


I dont care, video is unlisted, so less likely to be seen by general public. I might after I sell some copies, atleast to members +

StickToTheScript

2013-05-07 20:06:40

From: King
I dont care, video is unlisted, so less likely to be seen by general public. I might after I sell some copies, atleast to members +


Lolz. You should!!!

Hoodz

2013-05-08 13:39:09

does your screen has to be set to north? or can you also use rotated dtms?

King

2013-05-08 13:46:01

From: hoodz
does your screen has to be set to north? or can you also use rotated dtms?


It is better to set it nort, but that's why. We use FindDTMRotated(:

Hoodz

2013-05-13 08:17:24

From: King
It is better to set it nort, but that's why. We use FindDTMRotated(:


I tried it but i cant make a good path.. Its from the ghouls(south, Right next to the swamp entrance) to the bank in canafis (or something). All the colours there are simulair to each other (blue, green and brown).

King

2013-05-13 11:16:58

From: hoodz
I tried it but i cant make a good path.. Its from the ghouls(south, Right next to the swamp entrance) to the bank in canafis (or something). All the colours there are simulair to each other (blue, green and brown).


Are you using objects (Trees, buildings, signs, gate entrances ect )?

Hoodz

2013-05-13 12:32:09

From: King
Are you using objects (Trees, buildings, signs, gate entrances ect )?

the beginning of the path doesnt have buildings. and there are 100's of trees there so that is not going to work. also sometimes there is a teleport sign at the minimap and sometimes it isnt there. but i try it again with the gate entrance.

King

2013-05-14 10:35:04

From: hoodz
the beginning of the path doesnt have buildings. and there are 100's of trees there so that is not going to work. also sometimes there is a teleport sign at the minimap and sometimes it isnt there. but i try it again with the gate entrance.


Just because there is 100's of trees doesn't mean it isn't going to work. Don't use symbols as they move, use trees. You can easily make a pattern of them by choosing a few different shapes to play with in making the DDTM if you can get it, send me a picture of the MM of the area.

Hoodz

2013-05-14 16:54:33

From: King
Just because there is 100's of trees doesn't mean it isn't going to work. Don't use symbols as they move, use trees. You can easily make a pattern of them by choosing a few different shapes to play with in making the DDTM if you can get it, send me a picture of the MM of the area.


Billions* and i try it again :p and i send you a picture when im on my pc.

hamster31

2013-05-15 10:40:21

Thank you for this tutorial. It was really helpful =)

Haxz

2013-05-15 14:24:31

You lied about posting the link to DDTM editor :(]

Btw, gonna continue making my nats script since I failed walking last time. You're gonna pay me your law rune script if my walking still fails :D

EDIT: After all that DDTMs I made, it's still pretty inaccurate at certain point between the path from general shop to nature altar :(

Sk1nyNerd

2013-05-20 16:00:27

nice vid! wheres the link for the editor though?

chances of doing a vid on sorting ATPAs/TPAs by size and distance from character? :P been having some troubles lately

King

2013-05-20 16:40:39

From: ibot_dung11
nice vid! wheres the link for the editor though?

chances of doing a vid on sorting ATPAs/TPAs by size and distance from character? :P been having some troubles lately


Been slammed with finals, all ap ): I'll do them tomorrow or tonight!

http://villavu.com/forum/showthread.php?t=25312

Link to editor^ forgot about it XD

Solar

2013-05-20 17:21:15

Used this to make my first DTM to try and fix someones buggy script. Helped a lot, thanks. Was able to make some decent walking DDTM's after just a few minutes because of this vid.

King

2013-05-20 17:25:24

From: Solar
Used this to make my first DTM to try and fix someones buggy script. Helped a lot, thanks. Was able to make some decent walking DDTM's after just a few minutes because of this vid.


Glad it helped (: Ill post a video of My law rune runner using DDTM's to walk

Won

2013-05-28 13:47:36

How do you test the script out without having the script open a new client each time?

King

2013-05-29 07:49:11

From: Won
How do you test the script out without having the script open a new client each time?


What do you mean? I just hit play and then it runs again? Does your script open SMART everytime it runs?

Won

2013-05-29 17:19:03

From: King
What do you mean? I just hit play and then it runs again? Does your script open SMART everytime it runs?


Nvm it's not opening smart now eachtime but I still can't get it to even start testing:
[ATTACH]21503[/ATTACH]
A better question is how do I just test part of my script like you did in the video? Or will the script run through it quickly and know where it's at?

King

2013-05-29 20:10:02

From: Won
Nvm it's not opening smart now eachtime but I still can't get it to even start testing:
[ATTACH]21503[/ATTACH]
A better question is how do I just test part of my script like you did in the video? Or will the script run through it quickly and know where it's at?


Just comment out the DDTM walking you dont need in the procedure, then run only that procedure :)

Won

2013-05-29 21:13:24

From: King
Just comment out the DDTM walking you dont need in the procedure, then run only that procedure :)

Sorry for being such a noob but what do you mean by "comment out the DDTM walking" and do you mean run only the function?

King

2013-05-29 21:36:18

From: Won
Sorry for being such a noob but what do you mean by "comment out the DDTM walking" and do you mean run only the function?


put // in front of the procedure to make it not run that one and only put 1 procedure in your main loop.

Won

2013-05-29 22:11:03

From: King
put // in front of the procedure to make it not run that one and only put 1 procedure in your main loop.

Oh ok I gotcha thanks man and nice video

King

2013-05-29 22:27:32

From: Won
Oh ok I gotcha thanks man and nice video


Not a problem(:

ocmon01

2013-09-11 18:55:38

Thanks for the video tutorial:D I cant keep up with a lot of text tutorials, especially about DDTMs.

Kerskunkle

2014-04-02 01:13:30

Fantastic Tutorial, Thanks for taking the time to make a video, it made things so much easier to understand. Problem is I'm a noob to scripting and I can't figure out how to fix an error I keep getting "Unknown type 'TDTMPointDef' at line X"

edit: Neilsy95 answered this question in another thread here's what he had to say

"TDTM is defined in Simba.scar in SRL for Simba. Else you've got to use the Simba alternative (TMDTM).

type
TDTMPointDef = TSDTMPointDef;
TDTMPointDefArray = TSDTMPointDefArray;
TDTM = TSDTM;
function AddDTM(DTM : TDTM) : integer;
begin
result := AddSDTM(dtm);
end; "

In other words if anybody else is getting the error "Unknown type 'TDTMPointDef' at line X" Change anything with "TDTM" in it to "TSDTM" and your "addDTM" to "addSDTM"

King

2014-04-03 23:12:50

From: Kerskunkle
Fantastic Tutorial, Thanks for taking the time to make a video, it made things so much easier to understand. Problem is I'm a noob to scripting and I can't figure out how to fix an error I keep getting "Unknown type 'TDTMPointDef' at line X"

edit: Neilsy95 answered this question in another thread here's what he had to say

"TDTM is defined in Simba.scar in SRL for Simba. Else you've got to use the Simba alternative (TMDTM).

type
TDTMPointDef = TSDTMPointDef;
TDTMPointDefArray = TSDTMPointDefArray;
TDTM = TSDTM;
function AddDTM(DTM : TDTM) : integer;
begin
result := AddSDTM(dtm);
end; "

In other words if anybody else is getting the error "Unknown type 'TDTMPointDef' at line X" Change anything with "TDTM" in it to "TSDTM" and your "addDTM" to "addSDTM"


Saw the post, thank you for posting an answer as well!