Results 1 to 4 of 4

Thread: SkillCoords

  1. #1
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default SkillCoords

    Since this was updated in Dev Svn I keep getting an error, I found the silly error. I kept getting:

    [Runtime Error] : Out Of Range in line 322 in script C:\Program Files\Scar 3.21\includes\SRL\SRL\Core\GameTab.scar

    It comes from two different lines before it, those lines are 310 and 315, you just need to change:

    1) if (not InRange(Row, 1, 8)) then

    2) if (not InRange(Column, 1, 3)) then

    to:

    1) if (not InRange(Row, 0, 7)) then

    2) if (not InRange(Column, 0, 2)) then


    respectively.


    Remember, it's an array, it starts at 0 .

    Evilchicken, you been updating lots, fix it now!


    EDIT: Also, I think this is in the same file, if not sorry, but the script isn't getting the experience to go, it opens skill tab, but never goes to the skill.
    Last edited by Baked0420; 08-14-2009 at 10:40 AM.

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Fixed SkillCoords, thank you.

    Are you using GetXP to retrieve the XP?
    And, if so, for what skill(s)?

  3. #3
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    yes, I am using getxp and for mining thanks for the quick fix, well, I already fixed the one, but it'd be cool if you can fix getxp.


    EDIT: aww no fair, you give noidea credit for his fix in SVN changelog but not me, lol, I actually don't really care that much, just glad to help an annoying error.
    Last edited by Baked0420; 08-14-2009 at 11:04 AM.

  4. #4
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There's still an error in it...
    SCAR Code:
    function SkillCoords(Row, Column: Integer): TPoint;
    var
      RowArr: array [1..3] of Integer;
      ColArr: array [1..8] of Integer;
    begin
      Result := Point(-1, -1);
      if (not InRange(Row, 1, 8)) then
      begin
        srl_Warn('SkillCoords', 'Row #' + IntToStr(Row) + ' is an invalid row', warn_Warning);
        Exit;
      end;
      if (not InRange(Column, 1, 3)) then
      begin
        srl_Warn('SkillCoords', 'Column #' + IntToStr(Column) + ' is an invalid column', warn_Warning);
        Exit;
      end;
      ColArr := [577, 631, 687];
      RowArr := [228, 260, 293, 324, 356, 388, 420, 419];
      Result := Point(ColArr[Column], RowArr[Row]);
    end;

    But the beginning should be:
    SCAR Code:
    function SkillCoords(Row, Column: Integer): TPoint;
    var
      RowArr: array [1..8] of Integer;
      ColArr: array [1..3] of Integer;
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

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
  •