Results 1 to 4 of 4

Thread: Script not executing procedure

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

    Default Script not executing procedure

    So I have this procedure

    Simba Code:
    procedure declareDTMPaths;
    begin
      writeln('what the hell');
      setLength(toShop.dtmPoint, 2);
      setLength(toShop.dtmPoint[0], 2);
      toShop.dtmPoint[0][0] := DTMFromString('mrAAAAHic42BgYOhmYmCoBeJmIC4F4h4gngjE7UA8E4gdgGqMoNgNiQ3CpkD8/98/hpffX4Kxmi8fnA3D/4FqlPFgRgIYBgDuBRw5');
      toShop.dtmPoint[0][1] := DTMFromString('mggAAAHicY2NgYOhnYmCoAOIqIJ4CxNOAuAWIbYByTkDsCsSqQKwBxPpAXF+VyqDmy8dgocsGpz+/eMvwHyinjAUz4sAQAADFTQwz');
      writeln(length(toShop.dtmPoint));
    end;


    And for some reason when I call it it does not execute...

    main loop:

    Simba Code:
    begin
      mouseSpeed := 25;
      declareDTMPaths;
      setUpSoulsplitInclude(false);
     // toShop.walk();
      toShop.clearPoints();
    end.


    Code:
    Compiled successfully in 842 ms.
    Soulsplit include compiled in 0 ms
    Successfully executed.
    As you can see it does not write 'what the hell'

    Why is it not executing this procedure?

    Full script


    Simba Code:
    {$i Soulsplit/Soulsplit.simba}

    type DTMPath = record
      dtmPoint:T2DIntegerArray;
    end;

    var
      toShop:DTMPath;

    procedure declareDTMPaths;
    begin
      writeln('what the hell');
      setLength(toShop.dtmPoint, 2);
      setLength(toShop.dtmPoint[0], 2);
      toShop.dtmPoint[0][0] := DTMFromString('mrAAAAHic42BgYOhmYmCoBeJmIC4F4h4gngjE7UA8E4gdgGqMoNgNiQ3CpkD8/98/hpffX4Kxmi8fnA3D/4FqlPFgRgIYBgDuBRw5');
      toShop.dtmPoint[0][1] := DTMFromString('mggAAAHicY2NgYOhnYmCoAOIqIJ4CxNOAuAWIbYByTkDsCsSqQKwBxPpAXF+VyqDmy8dgocsGpz+/eMvwHyinjAUz4sAQAADFTQwz');
      writeln(length(toShop.dtmPoint));
    end;

    procedure DTMPath.clearPoints;
    var
      i, k:integer;
    begin
      for i := 0 to high(self.dtmPoint) do
        for k := 0 to high(self.dtmPoint[i]) do
          freeDTM(self.dtmPoint[i][k]);
    end;

    function FindDTMRotated(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; sAngle, eAngle, aStep: Extended; out aFound: Extended): Boolean;
    begin;
      result := FindDTMRotatedAlternating(DTM,x,y,x1,y1,x2,y2,sangle,eangle,astep,afound);
    end;

    function FindDTMRotated(DTM: Integer; var x, y: Integer; b:Tbox; sAngle, eAngle, aStep: Extended; out aFound: Extended): Boolean; overload;
    begin;
      result := FindDTMRotatedAlternating(DTM,x,y,b.x1,b.y1,b.x2,b.y2,sangle,eangle,astep,afound);
    end;

    function findBob():Boolean;
    var
      i:integer;
      msPoint:Tpoint;
      tpa:Tpointarray;
      atpa:T2DPointArray;
      cookRange:msObject;
    begin
      cookRange.new([2897070], [1], [0.13], [1.27], false, false, [''], [''], 40);
      msPoint := cookRange.findClosest();
      mouse(msPoint.x, msPoint.y - 74, 0, 0, mouse_right);
      if (waitOption('rade', 1200)) then
        exit(true);
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.00, 0.12);
      FindColorsSpiralTolerance(256, 166, TPA, 126702, 605, 119, 653, 166, 7);
      ColorToleranceSpeed(1);
      SetColorSpeed2Modifiers(0.02, 0.02);
      atpa := tpa.cluster(3);
      if (length(atpa) > 0) then
      begin
        SortATPAFromFirstpoint(atpa, Point(627, 84));
        for i := 0 to high(ATPA) do
        begin
          msPoint := atpa[i].getMiddle().toMainscreen();
          mouse(msPoint.x, msPoint.y, 0, 0, mouse_right);
          if (waitOption('rade', 1200)) then
            exit(true);
        end;
      end;
    end;

    function DTMPath.walk():boolean;
    var
      i, l, x, y:Integer;
      FA:Extended;
    begin
      writeln(length(self.dtmPoint));
      writeln(minimap.bounds);
      for i := 0 to high(self.DTMPoint) do
        for l := 0 to high(self.DTMPoint[i]) do
          if FindDTMRotated(self.DTMPoint[i][l], x, y, minimap.bounds, 0, 360, 14.00, FA) then
          begin
            if (distance(x, y, 648, 138) > 10) then
            begin
              Mouse(x, y, 0, 0, Mouse_left);
              wait(1200);
              if (minimap.flagPresent) then
              begin
                minimap.flag(6000);
                break;
              end;
            end;
          end;
    end;

    begin
      mouseSpeed := 25;
      declareDTMPaths;
      setUpSoulsplitInclude(false);
     // toShop.walk();
      toShop.clearPoints();
    end.

  2. #2
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    You prob did {$f-} in a include without knowing what it does.

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

    Default

    Quote Originally Posted by Olly View Post
    You prob did {$f-} in a include without knowing what it does.
    ahh sh!t forgot to remove that I know it's somewhere in there
    @Olly; what is it used for? They where all over the datatypes part of srl (which I copied over into my own include)

  4. #4
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    It's auto-invoke disables/enables it.

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
  •