Results 1 to 3 of 3

Thread: Symbol.Scar

  1. #1
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default Symbol.Scar

    Due to the new T2DPointArray, FindSymbols gets a runtime error (out of range or something)

    Fix:

    SCAR Code:
    procedure FindSymbols(var AnsTPA: array of TPoint; SymbolName: string);
    var
      tmpAOTPA: T2DPointArray;
      pAOTPA, tmpAL, tx, ty: Integer;
    begin
      getsymbolcolor(tx, ty, SymbolName);
      FindColorsTolerance(AnsTPA, getcolor(tx, ty), mmx1, mmy1, mmx2, mmy2, 0);
      tmpAOTPA := SplitTPAEx(AnsTPA, 10, 5);
      tmpAL := getarraylength(tmpAOTPA);
      setarraylength(AnsTPA, tmpAL);
      for pAOTPA := 0 to tmpAL - 1 do
        AnsTPA[pAOTPA] := MiddleTPA(tmpAOTPA[pAOTPA]);
    end;

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  2. #2
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    tmpAL - 1
    Use High(tmpAl).

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    This is the current (Developer's SRL #2035) FindSymbols:

    SCAR Code:
    {*******************************************************************************
    procedure FindSymbols(var AnsTPA: array of TPoint; SymbolName: string);
    By: Boreas
    Description: Finds a symbol in mutiple places.
    *******************************************************************************}


    procedure FindSymbols(var AnsTPA: array of TPoint; SymbolName: string);
    var
      tmpAOTPA: T2DPointArray;
      pAOTPA, tmpAL, tx, ty: Integer;
    begin
      getsymbolcolor(tx, ty, SymbolName);
      FindColorsTolerance(AnsTPA, getcolor(tx, ty), mmx1, mmy1, mmx2, mmy2, 0);
      tmpAOTPA := TPAtoATPA(AnsTPA, 10);
      tmpAL := getarraylength(tmpAOTPA);
      setarraylength(AnsTPA, tmpAL);
      for pAOTPA := 0 to tmpAL - 1 do
        AnsTPA[pAOTPA] := MiddleTPA(tmpAOTPA[pAOTPA]);
    end;

    However, in SRL Revision #14 FindSymbols does not use T2DPointArray yet.
    This will be fixed with the next Public release, Revision #15.

    N3ss3s: The GetArrayLength and tmpAL - 1 is actually Boreas' code.

    Thank you, JuKKa.

    Fixed and Closed.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. clicking the quest symbol then the bank symbol
    By RudeBoiAlex in forum OSR Help
    Replies: 7
    Last Post: 03-22-2007, 11:14 PM

Posting Permissions

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