Results 1 to 5 of 5

Thread: Object Reference Leaked in: Get3DObject??

  1. #1
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default Object Reference Leaked in: Get3DObject??

    Fixed Thanks all!

  2. #2
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    Right here;
    Simba Code:
    OurObject.Find(objGame, 'Lava forge', 11);

        if OurObject.Find(objGame,'Lava forge',) then

    The OurObject.Find(objGame,'Lava forge',) is defaulting to look for the object in a 103 tile radius by default. You only need to call TReflectObject.Find once. (so use it only on the if statement)

    Also you shouldn't need to TReflectObject.Free (i dont think it can be used anyway,), its done on TReflectObjectArray.GetAll; (used when you use ANY TReflectObject function).

  3. #3
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    Right here;
    Simba Code:
    OurObject.Find(objGame, 'Lava forge', 11);

        if OurObject.Find(objGame,'Lava forge',) then

    The OurObject.Find(objGame,'Lava forge',) is defaulting to look for the object in a 103 tile radius by default. You only need to call TReflectObject.Find once. (so use it only on the if statement)

    Also you shouldn't need to TReflectObject.Free (i dont think it can be used anyway,), its done on TReflectObjectArray.GetAll; (used when you use ANY TReflectObject function).
    Oops i areally changed to:

    if OurObject.Find(objGame,'Lava forge',11) then forgot the 11. but still nto working,.

    if OurObject.Find(objGame,'Lava forge',11) then
    begin

  4. #4
    Join Date
    Aug 2007
    Posts
    539
    Mentioned
    20 Post(s)
    Quoted
    266 Post(s)

    Default

    Weird... cause I just tried this;
    Simba Code:
    procedure getObj;
    var OurObject : TReflectObject;
        Point : TPoint;
    begin
      if OurObject.Find(ObjGame, 'Furnace', 11) then begin
        Point := Reflect.Tiles.TileToMs(OurObject.GetTile);
        writeln(Point);
      end;
    end;

    And it was working just fine.

    I'm sure you are up to date with the include.. I'm not sure why you would be getting this error,

  5. #5
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by ineedbot View Post
    Weird... cause I just tried this;
    Simba Code:
    procedure getObj;
    var OurObject : TReflectObject;
        Point : TPoint;
    begin
      if OurObject.Find(ObjGame, 'Furnace', 11) then begin
        Point := Reflect.Tiles.TileToMs(OurObject.GetTile);
        writeln(Point);
      end;
    end;

    And it was working just fine.
    Thanks mate!

    Edit: Still didnt find
    i was about to try IDs but it looks like the object got no ID... Lol o_O Also seen that on wall Glory in house before.

    Using ID Display from simba tools section i think.

    Edit1: It seems to work on normal furnace i see, but on Tzhaar it wont see.

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
  •