Log in

View Full Version : Need DTM help



John
01-18-2012, 04:17 AM
I have been following this tut: http://www.youtube.com/watch?v=SlS4q9MiFX4
and i get this error:
[Error] (12:5): String error at line 11
[Error] (12:5): Syntax error at line 11
Compiling failed.
Code:
program DTMTest;
{$i SRL\SRL.scar}

var
Tuna, X, Y: integer;


begin
Tuna := DTMFromString('78DA637CC5C0C0C0CAC8800C5223C3C1344 C9' +
'4F11B90F8CB80069850D57CC1340743CD5B20C14340CD0B20 C14740C' +
'D3D22D5B01350F318441050F31248B0A1AAF90F9383D2007F A70BAB'' +
');


If FindDTM(Tuna, X, Y, MSX1, MSY2, MSX2, MSY2); then
begin
WriteLn('Here we are');
MMouse( X, Y, 7, 7);
if IsuUpText('una'); then
Mouse( X, Y, 0, 0, True);
end;

FreeDTM(Tuna);


end.

Brandon
01-18-2012, 04:23 AM
Tuna := DTMFromString('78DA637CC5C0C0C0CAC8800C5223C3C1344 C9' +
'4F11B90F8CB80069850D57CC1340743CD5B20C14340CD0B20 C14740C' +
'D3D22D5B01350F318441050F31248B0A1AAF90F9383D2007F A70BAB'' + //<----------- Right there you have double quotes..


should be BAB' +... Not BAB''

John
01-18-2012, 04:28 AM
new error:
[Error] (13:5): String error at line 12
[Error] (13:5): Syntax error at line 12
Compiling failed.

Brandon
01-18-2012, 04:52 AM
if FindDTM(Tuna, X, Y, MSX1, MSY2, MSX2, MSY2); then <---- Semi colon needs to be removed..
if IsuUpText('una'); then <----- Semi colon needs to be removed.

John
01-18-2012, 05:12 AM
same error still [Error] (13:5): String error at line 12
[Error] (13:5): Syntax error at line 12
Compiling failed.

Brandon
01-18-2012, 05:27 AM
Not sure if u read anything i said or made the changes at all..

Anyway compare all your code line by line to the one below to see the difference.. Hopefully you understand it. If not just post here and I'll either check back and reply or if I'm sleeping, I'm sure someone else will ;)


program DTMTest;
{$i SRL\SRL.simba}

var
Tuna, X, Y: integer;


begin
Tuna := DTMFromString('78DA637CC5C0C0C0CAC8800C5223C3C1344 C9' +
'4F11B90F8CB80069850D57CC1340743CD5B20C14340CD0B20 C14740C' +
'D3D22D5B01350F318441050F31248B0A1AAF90F9383D2007F A70BAB');


If FindDTM(Tuna, X, Y, MSX1, MSY2, MSX2, MSY2) then
begin
WriteLn('Here we are');
MMouse( X, Y, 7, 7);
if IsUpText('una') then
Mouse( X, Y, 0, 0, True);
end;

FreeDTM(Tuna);
end.

John
01-18-2012, 05:37 AM
found at what it was, thanks for the help.