PDA

View Full Version : DTM Problem



Hey321
11-29-2006, 12:58 AM
Ok, so im exploring dtm's now (Yay!) and im getting Identifier Expected. All im using is a simple find DTM script i made from Yohojo's Tut. Anyways i made it for a tree DTM and as i said i get Identifier Expected. Explain whats wrong and what im doing wrong please :).

Script:



program Test;
{.include SRL/SRL.scar}

var
TreePart: Integer;

Procedure DTM;
Begin
TreePart := DTMFromString('78DA63AC64626058CCC8800C5AD36CC1344 C9' + '4B102A8661AAA9AB2687354352073D6A1AAA98AB540555303 54B3' + '96809A724C731A92AC50D59401D5CC4155D39DE380A20600F 2A50' + 'D71');
if FindDtm(TreePart, x, y, 0, 0, 0, 0) Then
Begin
Mouse(x, y, 5, 5, True);
Sleep(150+Random(150));
End;

Begin
SetupSRL;
ActivateClient;
Repeat
DTM;
End.

And remember:

A newb scripter will never learn anything if you give them the answer! Explain everything in as much detail as you can so all us newb scripters can learn more! :spot: :spot: :spot: Anyways i need help fast :duh:.

_ChArMz
11-29-2006, 01:05 AM
program Test;
{.include SRL/SRL.scar}

var
TreePart: Integer;

Procedure DTM;
Begin
TreePart := DTMFromString('78DA63AC64626058CCC8800C5AD36CC1344 C9' +
'4B102A8661AAA9AB2687354352073D6A1AAA98AB540555303 54B3' +
'96809A724C731A92AC50D59401D5CC4155D39DE380A20600F 2A50' +
'D71');
if FindDtm(TreePart, x, y, MSX1, MSY1, MSX2, MSY2) Then //Changed 0's, now will search MainScreen For DTM

Begin
Mouse(x, y, 5, 5, True);
Sleep(150+Random(150));
End //- Added An End

End;

Begin
SetupSRL;
ActivateClient;
Repeat
DTM;

Until(False); //- Needed An Until
End.

Fixed

Hey321
11-29-2006, 02:17 AM
Thanks Charmz. At first im like "wheres the explanation?" Then i saw it in the script :). Again thanks a lot.