Results 1 to 4 of 4

Thread: Any idea why I keep getting this error?

  1. #1
    Join Date
    Sep 2013
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    20 Post(s)

    Smile Any idea why I keep getting this error?

    Simba Code:
    procedure GetClayFromBank;

    begin
      if bankscreen then
      begin
      WriteLn('found bankscreen');
       if finddtm(CLAYDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
        begin
          AL_MissMouse(Point(X, Y), 2, 2);
          sleep(180 + random(220));
          if IsUpText('oft') then
          begin
           Writeln('Taking Clay');
           AL_FastClick(mouse_right);
           sleep(212 + random(159));
           chooseoption('Withdraw-All');
           FreeDTM(CLAYDTM);
           closebank;
           sleep(215 + random(242));
           findnoninventoryrandoms();
           end
          end
        end
    end;



    Error: Exception: The given DTM Index[1] doesn't exist at line 235


    The script finds the DTM perfectly the first time round. However, after a second run, I keep getting this error.


    Any advice would be greatly appreciated!

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Because your declaring the DTM and then freeing it, but not declaring it again:

    Simba Code:
    FreeDTM(CLAYDTM);

  3. #3
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Make a procedure with all your freedtm funtions. After that you should add that procedure on: addonterminate('procedurename ')

  4. #4
    Join Date
    Sep 2013
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    20 Post(s)

    Default

    Thanks a bunch!

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
  •