Results 1 to 5 of 5

Thread: Type Mismatch after a while?

  1. #1
    Join Date
    Jan 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Type Mismatch after a while?

    Simba Code:
    program new;
    {$i srl/srl.simba}



    procedure OBank;

    var
    x, y:Integer;
    a, b:Integer;
    q, w:Integer;
    e, r:Integer;
    u, i:Integer;
    o, p:Integer;
    s, d:Integer;
    k, l:Integer;
    Chest1:Integer;
    Chest2:Integer;
    MOre:Integer;
    MOre2:Integer;
    MOre3:Integer;
    Cross:Integer;
    Coal:Integer;
    Coal2:Integer;
    Coal3:Integer;
    Coal4:Integer;
    Bag:Integer;
    MBar:Integer;




    begin


    Chest1 := DTMFromString('mggAAAHicY2NgYGBmZGDgBmJhIP4G5P8EYl4g+xiQvgDEZ6D4IBAfAGIPWwMGa1M9hpb6Oob+zk6G/ORQhsQwLwZ2oBw2zIgDQwAAXzkNpA==');
       Chest2 := DTMFromString('mggAAAHicY2NgYGBlZGD4DqS/ArEIkM0BxHxAfBbIPwfERxgg7CdAfBiI40M8GarLShkmdncz9Hd2MsQEuTMkhnkxcADl2IEYRsMwIw4MAQDGNg7L');
          Cross := DTMFromString('mlwAAAHicY2dgYHjJyMDwBIhvAPE7KBsklg3ESgwQrAil1aFYBcSXFWPITfZnUJSVYIgKcmBIj/UCY38PMwY2oDw2zAXEjHgwFAAAPLoMpw==');
    MOre := DTMFromString('m6wAAAHiclcnBCkBAEIDh4bTlPeSKdnEQzi4OXkLEgZS392+tEi6mvvpnJhCRDMaJESFEjQolGmhMWLDjwIYZq7vbfcSAvOhFm47yX+zv6iRtRVHW16hHez/c5gSfIQpk');
    Coal := DTMFromString('m1gAAAHic42JgYEgG4kQgDgLiOCDOBeIMIM4B4nCoeCwQZwNxHlS+EogLgbgEiFOh6mF8VVUZBiVFKSCLCQUnB1gweNtogdkhzvoMnEAWCKMDZHEQzUgkRgAAyxMLgg==');
    Coal2 := DTMFromString('mrAAAAHic42BgYEgG4gQgzgbifCBOBeI8qFgmVLwUiAuAOAWIC4E4C4grgbgEiFVVZRjifUwZlBSlwDQDAxMK5gSSyBgdMBLAMAAAnYYJdQ==');
      Bag := DTMFromString('mrAAAAHic42BgYMhhYmDIZYLQiUBcBsSpQJwJxIVA/AKo5h4QfwLi10D8EogfA/FDIH4HxDOKQ4EkEwZujLJkqI+0YOBgwA44oJiRAIYBAMTQDmA=');
        MBar := DTMFromString('mlwAAAHicY2dgYJjOxMDQD8RzgHgpEM8E4vlQXMzIwFAHxDWMEHY+EBcAcTkQOzjEA3UzwbGBoSdYzNEpkYGTARVwImFGPBgKAKMuCw4=');
          MOre2 := DTMFromString('mrAAAAHic42BgYDAHYiMgdgRiNyC2BGITILaFimUDcSUQFwBxGhDnAXEOEBcBcRYQW1mFAUkmOAbxjYy9GSwsQxhywmwYOBlQAScaZiSAYQAAKbgJlg==');
         Coal3 := DTMFromString('mbQAAAHicY2VgYEgG4kQgTgDiVCDOAuIcIM4A4lwgzgfiQiDW0JBnUFKUAmMQW1VVhoETKI6OGbFgMAAA2aIGSg==');
           MOre3 := DTMFromString('mggAAAHicY2NgYDAHYlMgtgZiSyC2B2ITIM4B4gwonQ/EBVC2lVUYg5GxN4O5eRCYbWEZAuZzAuWwYUYcGAIAvCgImg==');
            Coal4 := DTMFromString('mrAAAAHic42BgYEgB4gQgzgTiXCDOgtJFUDkQvxKIS4C4AIgLgTgViNOAOB+INTTkgSQTHKuqyjDkhNmA2SA5AQZUIADFMDYjAQwDAHd5CVQ=');

          MouseSpeed := 10 + random(8);


     if FindDTM(Chest1, x, y, MSX1, MSY1, MSX2, MSY2) or
          FindDTM(Chest2, x, y, MSX1, MSY1, MSX2, MSY2) or
            FindObjCustom(x, y, ['ank chest', 'chest', 'Bank Chest'], ['8553096', '4542554', '3161416'], 7) then

    Mouse(x, y, 3, 3, true);

    while not FindDTM(Cross, k, l, MSX1, MSY1, MSX2, MSY2) do wait(405 + random(304));


    begin


             wait(208 + random(302));

         if FindDTM(Coal, o, p, 550, 208, 741, 464) or
              FindDTM(Coal2, o, p, 550, 208, 741, 464) or
                FindDTM(Coal3, o, p, 550, 208, 741, 464) or
                FindDTM(Coal4, o, p, MSX1, MSY1, MSX2, MSY2) then
         begin
            mouse(o, p, 6, 6, false);
            wait(2 + random(5));
            mouse(o, p + 90, 7, 2, true);
            wait(12 + random(103));
            end else
            end;

        if FindDTM(MBar, s, d, 550, 208, 741, 464 ) then
        begin
        mouse(s, d, 6, 6, false);
        wait(4 + random(16));
        mouse(s, d + 107, 6, 3, true);
        wait(24 + random(33));
        end;






    wait(800 + random(203));
      if FindDTM(Coal, e, r, MSX1, MSY1, MSX2, MSY2) or
          FindDTM(Coal2, e, r, MSX1, MSY1, MSX2, MSY2) or
            FindDTM(Coal3, e, r, 31, 85, 496, 319) then

      begin
      mouse(e, r, 2, 2, false);
      wait(104 + random(52));
      mouse(e, r + 104, 10, 2, true);
      if FindDTM(Bag, u, i, 548, 197, 731, 457) then
      begin
      mouse(u, i, 3, 3, false);
      mouse(u, i + 40, 5, 2, true);




      mouse(e, r, 2, 2, false);
      wait(84 + random(23));
      mouse(e, r + 75, 10, 2, true);


      if FindDTM(MOre, q, w, 31, 85, 496, 319) or
          FindDTM(MOre2, q, w, 31, 85, 496, 319) or
            FindDTM(MOre3, q, w, 31, 85, 496, 319) then
      begin
          Mouse(q, w, 2, 2, false);
          wait(102 + random(53));
          Mouse(q, w + 105, 10, 2, true);

          Mouse(488, 34, 2, 2, true);

          FreeDTM(Chest1);
          FreeDTM(Chest2);
          FreeDTM(Cross);
          FreeDTM(MOre);
          FreeDTM(MOre2);
          FreeDTM(MOre3);
          FreeDTM(Coal);
          FreeDTM(Coal2);
          FreeDTM(Coal3);
          FreeDTM(Coal4);
          FreeDTM(Bag);
          FreeDTM(MBar);

      end else

     end;
    end;
    end;




    ///////////////////////////////////////////////////////////////////

    procedure SuperHeat;

    var

    x, y:Integer;
    a, b:Integer;
    t, u:Integer;

    Spell:Integer;
    MOre:Integer;
    MOre2:Integer;
    MOre3:Integer;
    Rune:Integer;

    begin

    MOre := DTMFromString('mwQAAAHic42RgYMhjYmDIBOIEIC4E4gogrgbiAiAuBuJkIJ7OyMCwGIhnAnEPEM8H4qlAPBuIJwLxHCA2Mw9kiPEyAZrIhIItrcIYTE39GRJ9zRjYgSIgjA7YkTAjERgOACpsDZM=');
    MOre2 := DTMFromString('mrAAAAHic42BgYJjOxMAwBYgXAPEiIJ4KxPOg/LlAvIeRgeEYEB8E4u1AfAqIjwLxbiDeAsTm5kEMiX7mDBaWIQx5EXZAE5ng2NQsgIETyELGyADEZySAYQAAaQMPWw==');
    Spell := DTMFromString('mlwAAAHicY2dgYJjHxMAwFYhnAPFiIF4ExHOZIOKTGRkYJgFxJ5TuAuIWIJ4GxL9//2bQY2QG40MLBMC0PxsTgx0TMwMb0FxcmBEPhgIAz3oOEA==');
    MOre3 := DTMFromString('mlwAAAHicY2dgYJjJBMGLgXgBEE8F4oVAPA2IpzMyMMwD4ilQehEQTwTimUBsaRUG1M3EkB1mw2BmHsiQGmjJkOhrxmBq6s/AzwAB/FgwIx4MBQCmtg4E');
    Rune := DTMFromString('mggAAAHicY2NgYHBgYmBwBmIvIHYCYm8gdgPipwwQ/AKIPwDxYyB+CMRC9aJg3FhdzeDv48PQ0dQE5vMA5bBhRhwYAgBHTA1D');
         MouseSpeed := 12 + random(6);


      while not FindDTM(Spell, x, y, 543, 206, 737, 460) do wait(54 + random(23));

        if FindDTM(Spell, x, y, 543, 206, 737, 460) then

      mouse(x, y, 2, 2, true);

         while not FindDTM(Rune, t, u, 554, 210, 736, 464) do wait(12 + random(34));

        if FindDTM(MOre, a, b, MSX1, MSY1, MSX2, MSY2) or
            FindDTM(MOre2, a, b, 554, 210, 736, 464) then
      begin
        mouse(a, b, 2, 2, true);
        FreeDTM(Spell);
        FreeDTM(MOre);
        end;

        end;



    ///////////////////////////////////////////////////







    begin
    SetUpSRL;

      Mouse(656, 183, 5, 5, true);
      MakeCompass('S');
         KeyDown(VK_UP);
          wait(912 + random(144));
            KeyUp(VK_UP);


            repeat

    OBank
      wait(403 + random(145));

      mouse(746, 186, 3, 3, true);






    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat
    SuperHeat

          wait(860 + random(129));

        mouse(659, 186, 3, 3, true);

        until false





    end.






    It's at line 52 if FindDTM(Chest1, x, y, MSX1, MSY1, MSX2, MSY2) or

    What should I fix?
    It's a superheater by the way, superheats Mithril with a coal bag.

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Took me a while but I finally figured it out.

    In your FindObjCustom function you have put '' marks around your colours - you're only supposed to put them around strings, not integers

    Removing them should fix your problem.

  3. #3
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    I compiled it without error. Btw horrible standards:P

    edit
    In your FindObjCustom function you have put '' marks around your colours - you're only supposed to put them around strings, not integers
    this.

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by beginner5 View Post
    I compiled it without error. Btw horrible standards:P
    It compiles, but doesn't run longer than 5 seconds without stopping.

  5. #5
    Join Date
    Jan 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by beginner5 View Post
    I compiled it without error. Btw horrible standards:P
    It compiles yeah but stops after a while. Well, it gets the job done

    Yeah, I think that should fix it. Thanks.

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
  •