SRL Archive - OSR Help

DTM Fail


Iambubbleman

2012-01-22 16:47:36

program LongBowMaker;
{$DEFINE SMART}
{$i SRL\SRL.simba}
var
t: integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;

Procedure Llamas;
var
x, y, Logs, Knife: integer;
begin
Logs := DTMFromString('mbQAAAHicY2VgYMhkYWDIBuJyII6BYhdGBgZvRgTtAMRBptxA1UwomB9IomNGLBgMAGphBGo=');
Knife := DTMFromString('mggAAAHicY2NgYLBlYWAwBGIXFgjbEoitgdiekYHBF4gtgNgSiB2B2A2IYyMjgbqYsGDsgBEHhgAAkUQEKw==');
InvenKnife := DTMFromString('mggAAAHicY2NgYDjAxMBwEoi3AvF+KD4MxP+A+AMQ8zAzMDAD8W8g+zMQR4SGAHUxYcHYASMODAEA0KoJnA==');
InvenLog := DTMFromString('mrAAAAHic42BgYEhhY2DIAOIiII4F4igozoGKrWBkYNgCxEuAeBEQrwbiTUA8H0rH2vAATWHCg/EDRgIYBgDftAl5');
Setangle(0);
MakeCompass('w');
x:= MSCX;
Y := MSCY;
FindObjCustom(x, y, ['Talk-'], [4141109], 10);
Mouse(x, y, 3, 3, false);
WaitOption('ank B', 2000);
Wait(randomrange(1200, 1600));
FindDTM(knife, x, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y, 2, 2, true);
Wait(randomrange(1200, 1600));
FindDTM(Logs, x, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y, 2, 2, False);
Wait(randomrange(1200, 1600));
ChooseOption('All M');
CloseWindow;
Wait(randomrange(400,550));
FindDTM(InvenKnife, x, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y, 2, 2, true);
Wait(randomrange(100,150));
FindDTM(InvenLog, y, MSX1, MSY1, MSX2, MSY2);
Mouse(x,y, 2, 2, true);


//Chooseoption all; //Mouse(x,y, 2, 2, false); Chooseoption all. Bye
end;
Begin
smart_server := 91;
smart_members := false;
smart_signed :=true;
smart_superdetail := false;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Llamas;
end.
I've been making my first DTM scripts, and have gotten to this point (Look above) but it appears that there's something wrong with the DTM's. Especially the 3rd Declared one

InvenKnife := DTMFromString('mggAAAHicY2NgYDjAxMBwEoi3AvF+KD4MxP+A+AMQ8zAzMDAD8W8g+zMQR4SGAHUxYcHYASMODAEA0KoJnA==');

When I try to start the script That line is highlighted and this error comes up

[Error] (27:7): Unknown identifier 'InvenKnife' at line 26
Compiling failed.

If anyone knows what the issue is, I'd really appreciate help :) Thanks!

Chris

2012-01-22 16:51:44

You have to declare "invenknife" and the other DTMs as integers, just like you did with "knife", "x", "y" and "Logs"

Like:
var
x, y, Knife, Log, invenKnife, InvenLog:Integer;

smurg

2012-01-22 16:55:33

Also, make sure you free your DTM's.

kevin33

2012-01-22 16:56:24

Yea you have to declare it in variables as an integer. Chris is correct.

Iambubbleman

2012-01-22 16:56:27

OHHHH I totally forgot about Declaring them! Thanks Guy!