Results 1 to 10 of 10

Thread: MSTPointToBankPoint

  1. #1
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default MSTPointToBankPoint

    Now, i BELIEVE there to be something wrong with the function MSTPointToBankPoint, which can be found in Bank.scar. It just isn't processing the coordinates properly..

    scar Code:
    {*******************************************************************************
    Function MSTPointToBankPoint(P: TPoint): TPoint;
    by: Wizzup
    Description: Converts a point on the Mainscreen to the point in the Bank.
    First Row and Col are (0,0).
    *******************************************************************************}

    Function MSTPointToBankPoint(MSP: TPoint): TPoint;

    Begin
      Result.X := (MSP.X - 38) / 44;
      Result.Y := (MSP.Y - 90) / 45;
    End;

    Soo... just wondering if anybody else has noticed this?
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  2. #2
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    It should probably be div not / ?

    I am really not sure though. Are you sure its not working?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  3. #3
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I believe in my recent script I had to do TPoint + 1 for it to work correctly.

    If you Writeln the TPoint coords I was getting like x: -6 and y: 46. The y was off a little but the x was off the screen :P.

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  4. #4
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    I don't know, but when i use the Withdraw function the script just terminates, also, when i move the mouse to the main screen coordinates it goes to the object, but when converting to bank screen coordinates the mouse just goes off the screen..
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

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

    Default

    The first item is 0, 0 if I recall correctly. (Not 1, 1 if you were expecting that.)



    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)

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    The first item is 0, 0 if I recall correctly. (Not 1, 1 if you were expecting that.)
    Using Bank Points, first slot is 0, 0.
    Using Bank Index, first slot is 1

    Unless something has changed.

  7. #7
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Well....

    Here are some of the coordinates it's returning for me..

    370671616, -2129133501
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  8. #8
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Dan's The Man View Post
    Well....

    Here are some of the coordinates it's returning for me..

    370671616, -2129133501
    That looks like you didn't drag the crosshairs.

  9. #9
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    That looks like you didn't drag the crosshairs.
    I was using SMART.. With SRL setting up SMART...
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  10. #10
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Dan's The Man View Post
    I was using SMART.. With SRL setting up SMART...
    First test moving the mouse to MSX2, MSY2. Then you can tell if SMART has lost it's focus or not.

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
  •