Results 1 to 4 of 4

Thread: function MyFunction: Tpoint; possible????

  1. #1
    Join Date
    Mar 2007
    Posts
    107
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default function MyFunction: Tpoint; possible????

    SCAR Code:
    program New;

    function MyFunction: TPoint;
    begin
      Result.X := 500;
      Result.Y := 500;
    end;

    begin
      MoveMouse(MyFunction.X, MyFunction.Y);
    end;


    doesn't compile sadly, anyway to get around this??

    edit: tried this as well

    SCAR Code:
    program New;

    function MyFunction: TIntegerArray;
    begin
      Result[0] := 500;
      Result[1] := 500;
    end;

    begin
      SetArrayLength(MyFunction, 2);
      MoveMouse(MyFunction[0], MyFunction[1]);
    end.

    is it impossible to make a function an array or custom var?

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    function MyFunction: TPoint;
    var
      temp: TPoint;
    begin
      temp.x := 500;
      temp.y := 500;
      result := temp;
    end;
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    PHP Code:
    program New;

    var
      
    ATPointTPoint;
     
    function 
    MyFunctionTPoint;
    begin
      Result
    .:= 500;
      
    Result.:= 500;
    end;
     
    begin
      ATPoint 
    := MyFunction;
      
    MoveMouse(ATPoint.XATPoint.Y);
    end
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  4. #4
    Join Date
    Mar 2007
    Posts
    107
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i was trying to get around using extra vars for convenience but oh well

    edit: thanks lol

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. TPoint
    By Shuttleu in forum OSR Help
    Replies: 6
    Last Post: 08-07-2008, 05:38 PM
  2. Seperate Tpoint
    By 13om13e12 in forum OSR Help
    Replies: 2
    Last Post: 06-07-2008, 04:29 PM
  3. Tpoint help.
    By Wade007 in forum OSR Help
    Replies: 3
    Last Post: 02-22-2008, 06:20 PM
  4. help with Tpoint error
    By stampede10343 in forum OSR Help
    Replies: 3
    Last Post: 02-09-2008, 09:34 PM
  5. Function():TPoint ?
    By A G E N T in forum OSR Help
    Replies: 9
    Last Post: 12-08-2007, 01:35 AM

Posting Permissions

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