Results 1 to 3 of 3

Thread: A little DTM help?

  1. #1
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Exclamation A little DTM help?

    SCAR Code:
    program new;
    var
    KingWait,KingReady,X,Y : Integer;


    procedure MainLoop;
    begin
      KingWait := DTMFromString('78DA635461606090654001AB67410418A17C4' +
           '62120C1CA8015C0D518030916026A1C81842AAA1C8FB03CAA1A90' +
           '19CA04CC1105124E04D49803093B5439694976543520BF3BE0370' +
           '700E7020438');
      if FindDTM(KingWait, X, Y, 1, 1, 1, 1) then
      begin
        writeln('KingWait');
        repeat until
        KingReady := DTMFromString('78DA633464606090654001AB67410418A17C4' +
           '60520C1CA8015C0D538020916026A12818432AADC925E3D5435CC' +
           '40420D55CDCC666D54358A40C206550D3F3F2BAA1A5B20618BAA4' +
           '64E8E1B450D0089AE06BD');
        if FindDTM(KingReady, X, Y, 1, 1, 1, 1) then
        begin
          writeln('KingReady');
        end;
      end;
    end;

    begin
    ClearDebug;
    MainLoop;
    end.

    Type mismatch error, but I don't know what that means, or how I can fix it. Any help? Thanks.
    "SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
    -Wizzup?

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    You're repeat...until loop is bad. Needs to be:
    SCAR Code:
    repeat
      //code here
    until(condition)

    Edit: Also, why are you looking in such a small area for your DTM?

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    You error is cause by the repeat..until loop. Remove that line and you'll get rid of the error. If you want the script to repeatedly look for the DTM, then you can do something like this:
    SCAR Code:
    repeat
      Wait(100 + Random(500));
    until (FindDTM(KingReady, X, Y, 1, 1, 1, 1));
    I would also suggest adding in an in creasing integer every time it looks for the DTM so it will break out of the loop if it doesn't find it after 50 tries or something like that.

    I hope that helps.

    Coh3n
    Last edited by Coh3n; 10-21-2009 at 09:07 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •